General Log Parser
Introduction
General log parser is a tool for simple parsing of log files line by line. It assumes your log is in the form of a series of strings separated by tab or some kind of special field separator.
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 which does NOT contains ‘server1’
logparser -l tests/a.20150505.log --not-line-filter server1
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.7 (2015-05-29)
Fix bug with piped input
0.1.6 (2015-05-22)
Support unicode
0.1.5 (2015-05-19)
Port to python 3
0.1.4 (2015-05-16)
Add negative filter.
0.1.3 (2015-05-16)
Update Readme and license.
0.1.0 (2015-05-16)
First release on PyPI.
Metadata
Release files for general-log-parser 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| general-log-parser-0.1.7.tar.gz | 14.7 kB | Without provenance | Details for general-log-parser-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| general_log_parser-0.1.7-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for general_log_parser-0.1.7-py2.py3-none-any.whl |
Total release size: 22.2 kB
Release files / general-log-parser-0.1.7.tar.gz
| Download URL | general-log-parser-0.1.7.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8935556fb850169ad5effa1166055468f2b44fafa49e46e517617406c34cee6
|
|
BLAKE2b-256 checksum How to use checksums |
d5f5b9807e176061ba1c48d1d1f0f5e5e5f43a580b01c41cd2a5a7e77ff447e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / general_log_parser-0.1.7-py2.py3-none-any.whl
| Download URL | general_log_parser-0.1.7-py2.py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
33b5b87e65dac7b2244c340eebb75bc287f7c25945f162454625b8b8797bb0b2
|
|
BLAKE2b-256 checksum How to use checksums |
53715c8518f39e3c8c57e32983c4e4f7e438ed31c02b112001f6ed7afe52c52b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for general-log-parser 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.