Skip to main content

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.

Metadata

Release files for loganalyst 1.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for loganalyst 1.0.14
File Size Uploaded
loganalyst-1.0.14.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for loganalyst 1.0.14
File Interpreter ABI Platform
loganalyst-1.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / loganalyst-1.0.14.tar.gz

Download URL loganalyst-1.0.14.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ebf35a3c7fc286d8094fbf86423c64fa7d346eaa132a80739fd65cd01aa7e469
BLAKE2b-256 checksum
How to use checksums
7277c5b9710c5f8fa7c9a2150a9e6bbf77271d709bf1c4cea8f78e41576ddf78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.9 Linux/6.1.11-zen1-1-zen

Release files / loganalyst-1.0.14-py3-none-any.whl

Download URL loganalyst-1.0.14-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f690434274715e0dfd7340807b68d03b29ceaeaba07abb5f6390fbc482dd3a9
BLAKE2b-256 checksum
How to use checksums
8e75f11e2d6b63eb277d86f5f2d99a0626c104d1b3d70c14bb083d29c3a6e26b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.9 Linux/6.1.11-zen1-1-zen

Release history Release notifications | RSS feed

This release

1.0.14 This release

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page