CLI for parsing log files
About the project:
Beaver is a cool command line utility that parses log files. Super exciting, right??
When modern applications run, they generate a plethora of logging content, and it is often cumbersome to find the small tidbit of information that's actually useful.
Beaver uses an English-like syntax, where the user can essentially specify show me the logs from yesterday to today. Beaver is smart enough to understand what the user is looking for and automatically searches for .log files in the project directory, and then prints all logs whose timestamps are between yesterday and today.
It's called beaver because beavers eat logs 😉
PythonView on GitHub View on PyPI
beaver parses log files based for a given date and time range, so you don't have to. Here's how to use
beaver's intuitive syntax.
Perhaps you'd like to see the logs for your website since the last time you pushed to production last Wednesday. This can be accomplished easily with
$ python3 beaver.py Wednesday to today
2019-04-03 15:10:26,618 - simple_example - DEBUG - debug message
2019-04-03 15:12:45,124 - simple_example - DEBUG - debug message
All of the following examples will work:
$ python3 beaver.py 10:35 to 11:35
$ python3 beaver.py yesterday to today
$ python3 beaver.py Mar 2nd, 2012 to now
$ python3 beaver.py 2017-06-18 to May 3rd 2018 at 3:17pm
$ python3 beaver.py 1:23pm on August 15th 2017 to 10:35 PM on 2 April 2018
beaver automatically looks for any files ending in
.logs, but you can also specify a specific file to parse with the
$ beaver -f my_log_file.txt May 17th to today
beaver's English-like syntax was inspired by Dan Bader's schedule module, which uses a similar syntax.