Skip to main content

Logreach

Reach into collected log dumps: logreach detects the type of each logfile (syslog, audit, access or JSON) and prints the lines within a time window.

Important: Logreach is an early proof of concept and under development.

Installation

Requires Python >= 3.14.

From PyPI:

uv tool install logreach # or pip install logreach
logreach --help

From source:

git clone https://github.com/ait-testbed/logreach.git
cd logreach
uv run logreach --help

When running from source, prefix the commands below with uv run.

Usage

# all lines of one logfile, type detected automatically
uv run logreach /var/log/syslog

# only the lines between two timestamps
uv run logreach /var/log/syslog --begin '2026-09-01 14:00' --end '2026-09-01 15:00'

# every logfile below a directory
uv run logreach gather/logs --begin '2026-09-01 14:00' --end '2026-09-01 15:00'

# one line per log line, "timestamp path:lineno:line" (timestamp in UTC), for example to sort all files by time
uv run logreach gather/logs --begin '2026-09-01 14:00' --plain | sort

# only show the detected type of each file and the problems found
uv run logreach gather/logs --check

# also ask for the type of each file that is not detected, and save the answers in logtypes.json
uv run logreach gather/logs --check --interactive

gzip-compressed files (e.g. rotated syslog.2.gz) are decompressed while reading; they are recognized by their content, not their name.

Files where no type fits and lines without a timestamp are listed on stderr at the end of the run (exit code 1). See logreach --help for all options and the documentation for more examples.

Configuration files

Both are read from the current directory and created empty if missing:

  • ignore_list.txt: one regex per line; matching paths are skipped when reading a directory.

  • logtypes.json: one JSON object per line that sets the type of a file instead of detecting it (--check --interactive writes it for you):

    {"logfile_path": "gather/logs/zm/web_php.log", "type": "syslog", "datetimeregex": "\\A(.+?UTC)"}
    {"logfile_path": "gather/logs/suricata/suricata.log", "type": "syslog", "dayfirst": true}
    

Contributing

See CONTRIBUTING.md.

Security

see SECURITY.md.

License

EUPL-1.2

Metadata

Release files for logreach 0.2.0

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

Source distribution (sdist)

Source distribution for logreach 0.2.0
File Size Uploaded Provenance Actions
logreach-0.2.0.tar.gz 33.1 kB With provenance Details for logreach-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 59.4 kB

Release files / logreach-0.2.0.tar.gz

Download URL logreach-0.2.0.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
06a538378544315e672b59a77f033f895e1620488d6c89b8d6ed4847a9da548c
BLAKE2b-256 checksum
How to use checksums
4abdf17ac2dcab1f20526ecd85f99024c7c6653e73f1a43781bc71e9b94b65c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / logreach-0.2.0-py3-none-any.whl

Download URL logreach-0.2.0-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74de06c93838a27c7cbb5169235d3dc767297383d42e3c78b224850b922f3601
BLAKE2b-256 checksum
How to use checksums
28cc1cb494a5ede653f0ac504f2224c8826b60e45b6db3d8e0a3de5ec348e237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for logreach 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for logreach-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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