A general log parser
Project description
Introduction
General log parser is a tool for simple parsing of log files line by line.
It offers 2 modes:
Parsing from standard input.
Parsing from a file or a list of files.
Usage examples
Uses the test files from the tests folder.
Parse from standard input
cat tests/a20150505.log | logparser
Parse from single file
logparser -l tests/a.20150505.log
Parse from a list of files
logparser -l a.{}.log --from 20150501 --to 20150506 --input-dir tests
Get all lines contains ‘server1’
logparser -l tests/a.20150505.log --line-filter server1
Get all lines contains ‘server1’ OR ‘server2’
logparser -l tests/a.20150505.log --line-filter server1 --line-filter server2
Get all lines where the third field > 9939928
logparser -l tests/a.20150505.log --cond-filter "{2} > 9939928"
Get all lines print only the second and third fields
logparser -l tests/a.20150505.log --line-filter server1 -o "{1} {2}"
License
Uses the MIT license.
History
0.1.3 (2015-05-16)
Update Readme and license.
0.1.0 (2015-05-16)
First release on PyPI.
TODO
Port to Python3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
general-log-parser-0.1.3.tar.gz
(14.4 kB
view hashes)
Built Distribution
Close
Hashes for general_log_parser-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f48e8ba754a47c184b65b9db9fa9905764bef4ff8589e52f5310c62a26a8fd23 |
|
MD5 | 1e5e375844718368bdba1403b702a099 |
|
BLAKE2b-256 | baf9d86eead6ffcd8f701a9b67e7ca1c6d38d9fb5a4da7401ed60f20f26a78db |