Skip to main content

loglens

Cluster big logs into templates with counts, severities and incident spikes — streaming, stdlib only, no file size limit.

$ loglens scan app.log
lines    3,000 (222,367 bytes)
time     2026-10-30 09:00:00 … 2026-10-30 10:39:58
levels   INFO 1,999, DEBUG 579, WARNING 273, ERROR 149

  1,999×  L1-L2999  [INFO]
        2026-10-30 09:00:00 INFO request handled path=/api/lots/26 status=200 dur=37ms

  149×  L902-L1050  [ERROR]
        2026-10-30 09:30:02 ERROR api.db timeout after 30s query=select * from lots where id=491

$ loglens spikes app.log
problems across 30 buckets (total 422 in 3,000 lines)
  2026-10-30 09:33:26        149  ████████████████████████████████████████

A 500 MB log cannot be read — by a human or by an agent with finite context. But logs are repetitive: numbers, UUIDs, IPs, hashes and quoted strings normalize away, and 3000 nearly-identical lines collapse into a handful of templates with counts, line ranges and one real sample each. That's all the information a triage needs.

Commands

loglens scan <log> [--top 15] [--json]   # template clustering + severity counts
loglens spikes <log> [--buckets 30] [--json]  # when problems happen (time or line buckets)
loglens demo [dir]                       # synthetic log with a planted incident

Streaming: the file is read line by line, memory holds only templates. Any text log; timestamps understood in ISO, Apache-bracketed and bare HH:MM:SS forms (no timestamps → line-range buckets). Python 3.11+, stdlib only.

Install: pip install logtriage — or from this repo: pip install "git+https://github.com/juzorei/loglens#subdirectory=tools/loglens"

The companion agent skill lives in skills/log-triage: cluster first, read only samples, then bounded reads around the incident. Skills: npx skills add juzorei/loglens.

Metadata

Release files for logtriage 0.1.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 logtriage 0.1.0
File Size Uploaded Provenance Actions
logtriage-0.1.0.tar.gz 7.4 kB With provenance Details for logtriage-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 14.4 kB

Release files / logtriage-0.1.0.tar.gz

Download URL logtriage-0.1.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
37a79dab6e4b4da08801dcc6928c70e268c6d2423b10c02ad33ec1d7878b3b4a
BLAKE2b-256 checksum
How to use checksums
fbb949b8b06aace770cc72ee0d0375b8766dd32adc962c32916eda5e039ad9af
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 Oct 30, 2026.

Transparency log

Release files / logtriage-0.1.0-py3-none-any.whl

Download URL logtriage-0.1.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5965039ec969e6cedb1ebdf0dd664abf68c1ff872dd4246b9df2d7a1bdfd0ac7
BLAKE2b-256 checksum
How to use checksums
ec6baecb9167484aeecc8f0299446cb008a65aca693987fe51d897397447c40d
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 Oct 30, 2026.

Transparency log

Security for logtriage 0.1.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for logtriage-0.1.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 Oct 30, 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.1.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