Analyse some log files
Project description
Log analyst
Features
- parse log files
- filters by date / timestamps
- correlates log lines (start and end of some processing)
- show total duration
- friendly colored output
- able to output short summaries
- "folding" lines
- keeps lines not matching an iso timestamp attached to the matching ones
- supports gzipped files
Usage
usage: loga [--extra] [--summary] [--nolog] [--max] [-b DATE] [-e DATE] [-h]
TOML_FILE LOG_FILE
positional arguments:
TOML_FILE (Path, default=None) correlation rules to use
LOG_FILE (Path, default=None) (possibly gzipped) log file
options:
--extra (bool, default=False) show extra log lines (not
matched by iso_regex)
--summary (bool, default=False) show summary
--nolog (bool, default=False) don't show log
--max (bool, default=False) show max durations
-b DATE, --begin DATE
(Optional[str], default=None) start from a date
-e DATE, --end DATE (Optional[str], default=None) stop to a date
-h, --help show this help message and exit
For instance, with systemd logs:
journalctl -b 5 -o short-iso | loga --summary --nolog correlators/sample.toml -
Sample correlation
Note: the "loganalyst" section is a configuration, which is optional, use only in case overriding values is needed.
Use the documented correlation file in correlators/sample.toml. You can also download the file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
loganalyst-1.0.14.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for loganalyst-1.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f690434274715e0dfd7340807b68d03b29ceaeaba07abb5f6390fbc482dd3a9 |
|
MD5 | f271f6ec6931d1f7ac85d65c8f9fe94a |
|
BLAKE2b-256 | 8e75f11e2d6b63eb277d86f5f2d99a0626c104d1b3d70c14bb083d29c3a6e26b |