A collection of tools for easy parsing and analyzing of log files and stack trace data.
Sawmill is a Python package that allows users to query log files using SQL commands. It is designed to be user-friendly and extensible, with the goal of saving time and improving efficiency when working with log files.
- How to install and usage sawmill.
- How to contribute to the project.
- How it works.
- How sawmill breaks down and represents your file as a machine-searchable datatype interally.
To use Sawmill, run:
sawmill [path/to/file] [sql command string]|[sql command from file.sql]
This command returns a pandas DataFrame with the selected columns and rows defined in the SQL script.
Please review and confirm the expected prerequisites
- Install sawmill on your local machine with pipx
- While this can be done with Python's official installer, [pip], via your system-installed Python, it is strongly recommended to use pipx
- Install pipx:
-
Install Sawmill with pipx:
pipx install sawmill
-
You can now use Sawmill from the command line. Check out the Usage section, next.
For common issues encountered during installation, please review the Troubleshooting section.
-
Make sure that Python and it's dependency installer pip, are available on the user's local machine. Please refer to the first two sections in Requirements for Installing Packages - Python Packaging User Guide
-
The user is expected to have a very basic understanding of, or willingness to learn, the following: A modest amount of SQL, a little bit about how to use the Unix command line
-
The user should already have pipx installed on their local machine
For those who wish to self-learn more about the topics above, Recommended Learning Resources file.
Thank you for your interest in contributing to Sawmill!
Please see the CONTRIBUTING.md file for more information -- NOT REQUIRED for general usage!!
# command returns pandas DataFrame with user-select columns and rows defined in the SQL script
sawmill [path/to/file] [sql command string]|[sql command from file.sql]