Logfilter is a cool Python app that helps you keep an eye on really long log files in real-time. It's like taking the tail -f
command, mixing it with grep -e PATTERN
, and adding a user-friendly GUI. This way, you can pick which log file to watch and what filters to apply. In short, that's what Logfilter is all about!
You can grab Logfilter from either the Bitbucket Mercurial repository or the Python Package Index (PyPI). If you're feeling adventurous and want to try out the latest features—though they might be a bit unstable—go for the Bitbucket option. But if you prefer stability and don't want to deal with bug reports, stick with PyPI.
If you choose Mercurial, here's how:
cd /wherever/you/want
hg clone https://bitbucket.org/iamFIREcracker/logfilter
python setup.py install
If you decide on PyPI instead, follow these steps:
cd /path/to/workspace
wget http://pypi.python.org/packages/source/o/logfilter/logfilter-0.1.0.tar.gz
tar zxvf logfilter-0.1.0.tar.gz
cd logfilter-0.1.0
python setup.py install
You can also simply run this command:
pip install logfilter
If you're curious about how to configure Logfilter, running python logfilter.py -h
will show you some options:
usage: logfilter.py [-h] [-s SLEEP_INTERVAL] [-f NUM_FILTERS] [-l LIMIT]
[-e FILTERS]
[FILENAME]
This lets you filter content dynamically as it streams in.
No worries if this sounds complicated! You don't need all these settings at once; the GUI will help you out later on.
You might want to set up some quick commands for your work too! For instance, if you're dealing with logs that include Java stack traces and want alerts for new exceptions, try running this:
python logfilter.py -e '([Ee]xception|\tat)' LOGFILE.log
If you're working on a module linked with certain keywords while still keeping track of errors from the whole project, use something like this:
python logfilter.py -e '([Ee]xception|\tat)' -e FOO LOGFILE.log
Go to the Softpas website, press the 'Downloads' button, and pick the app you want to download and install—easy and fast!
SoftPas is your platform for the latest software and technology news, reviews, and guides. Stay up to date with cutting-edge trends in tech and software development.
Subscribe to newsletter
© Copyright 2024, SoftPas, All Rights Reserved.