Skip to main content

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 -s 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


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.12.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

logAnalyst-1.0.12-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file logAnalyst-1.0.12.tar.gz.

File metadata

  • Download URL: logAnalyst-1.0.12.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.18.16-zen1-1-zen

File hashes

Hashes for logAnalyst-1.0.12.tar.gz
Algorithm Hash digest
SHA256 3f9261d065f9dd640eee861ae2f88b7e28fa59f0a6e1452c782c3170e52742b1
MD5 6e41bad327613db65f7498b696978d6d
BLAKE2b-256 ccf26c2895bead469706ed01c9bab64978df45e047b2a75dfec257ccc6e6dc4e

See more details on using hashes here.

File details

Details for the file logAnalyst-1.0.12-py3-none-any.whl.

File metadata

  • Download URL: logAnalyst-1.0.12-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.18.16-zen1-1-zen

File hashes

Hashes for logAnalyst-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 c165b94c72b1caa1ed17f096423900c2e9bd9fc07d7f080b225c47f51eb3580f
MD5 5750a49cbd262ed3f2584127c86598bf
BLAKE2b-256 430a5760e1ff12c518d42243741ef415d94ae6700568d9a2f06ae824202dde7c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page