Find out why it failed, from the log files. For people and AI agents, with a Rust parser
English | 日本語
logler is for the hour after something went wrong. It reads the log files where they are and helps you work out why: which requests failed, what one of them did across services, how it differs from a request that worked, and where the time went. It sits between grep, which finds strings and knows no structure, and a log platform, which needs servers. Nothing is uploaded and nothing runs in the background.
Every investigation command has a JSON form under logler llm, made for an AI agent to call; the same engine is a Python library and a terminal viewer.
Install
pip install logler
Python 3.12 or newer. The wheels include the Rust parser, so no compiler is needed.
Quick start
Save five lines as app.log:
{"timestamp":"2026-11-14T10:00:00.000Z","level":"INFO","message":"request start","thread_id":"req-123","span_id":"a","service":"api"}
{"timestamp":"2026-11-14T10:00:00.050Z","level":"INFO","message":"auth ok","thread_id":"req-123","span_id":"b","parent_span_id":"a","service":"auth"}
{"timestamp":"2026-11-14T10:00:00.450Z","level":"ERROR","message":"Redis connection refused","thread_id":"req-123","span_id":"c","parent_span_id":"a","service":"cache"}
{"timestamp":"2026-11-14T10:00:00.520Z","level":"INFO","message":"request done","thread_id":"req-123","span_id":"a","service":"api"}
{"timestamp":"2026-11-14T10:00:01.000Z","level":"ERROR","message":"timeout talking to db","thread_id":"req-124","span_id":"d","service":"api"}
For an agent (JSON out):
$ logler llm triage app.log
{"assessment": {"severity": "critical", "confidence": 0.95, "summary": "Error rate: 40.0%, 2 errors in 5 entries"}, ...}
$ logler llm search app.log --level ERROR --tail 5
$ logler llm hierarchy req-123 --files app.log
For a person:
logler view app.log --level ERROR # coloured terminal output
logler stats app.log # counts per level
From Python:
from logler.investigate import follow_thread_hierarchy, search
results = search(files=["app.log"], level="ERROR", limit=5)
for hit in results["results"]:
print(f"[{hit['entry']['level']}] {hit['entry']['message']}")
# [ERROR] Redis connection refused
# [ERROR] timeout talking to db
tree = follow_thread_hierarchy(files=["app.log"], root_identifier="req-123")
An investigation, step by step
| The question | What answers it | |
|---|---|---|
| 1 | How bad is it, and since when? | triage, summarize |
| 2 | Which requests failed? | search --level ERROR, ids |
| 3 | What did one failed request do, and where did its time go? | hierarchy, bottleneck, correlate across several services' files |
| 4 | How did the error travel? | analyze_error_flow(): from an error, the path it took and the spans it affected |
| 5 | What differs from a request that worked, or from yesterday? | compare for two requests or two time periods, diff |
| 6 | Does the evidence fit the suspected cause? | verify-pattern, metrics, sql |
| 7 | What did we find? | session note, session conclude: a saved investigation with notes and a report |
Steps 3 to 5 follow ids, so the lines need a request, thread, trace or span id. Without ids, steps 1, 2 and 6 still work.
Also there: a representative sample of a large file (sample), format detection and recurring message templates (detect, templates), and export of a trace to Jaeger or Zipkin (export).
Formats read without configuration: JSON (the most reliable), syslog (RFC 3164 and 5424), logfmt, Apache common log format, plain text. A format of your own is a regex in .logler/formats.yaml (docs/CONFIGURATION.md).
The request tree of req-123 in the quick-start file, as format_tree() prints it:
└── request start (2 entries, 520ms)
├── auth ok (1 entries, <1ms)
└── ❌ [1 errors] Redis connection refused (1 entries, <1ms)
The agent commands
All under logler llm, all JSON. Exit code 0 means results, 1 means none, 2 an error of yours (a bad argument, a file that cannot be read), 3 an internal error.
| Purpose | Commands |
|---|---|
| First look | triage, summarize, schema |
| Search | search, ids, sample, sql |
| Tracing | correlate, hierarchy, bottleneck, context, export |
| Comparison | compare, diff |
| Sessions | session create/list/query/note/conclude |
| Formats | detect, format list/test/validate, templates |
| Correlation | correlation list/run, correlate-events |
| Metrics and checks | metrics, verify-pattern, emit |
The commands that read log files, all but context and format test, also take --db path/to/app.db and read the log records stored in a sqler database, which is how qler's qler logs shows a job's log lines.
Full reference: docs/LLM_CLI_REFERENCE.md
When to use it
Good for: working out the cause of an incident when the evidence is log files on a disk; an agent that has to investigate logs; following one request through several services' files; comparing a failing case with one that worked.
Use something else when you need to watch logs live in a terminal (gonzo, lnav), store and aggregate them (Loki, ELK, Datadog), alert in real time (Prometheus with Alertmanager), or only search text (ripgrep).
Interactive tours
Seventeen marimo notebooks with their own sample data: open them in the browser, or run one locally with uv run marimo edit examples/tours/tour_01_fundamentals.py.
| Tour | Topics |
|---|---|
| 01. Fundamentals | Search, filter, output formats |
| 02. Thread Tracking | Grouping, correlation IDs |
| 03. Hierarchy | Tree views, waterfall, bottleneck |
| 04. Investigation | Sessions, history, reports |
| 05. Pattern Detection | Repeated patterns, frequency |
| 06. Flamegraph | Where the time went |
| 07. Error Flow | Root cause, propagation |
| 08. Comparison | Diff trees, compare threads |
| 09. Tracing Exports | Jaeger and Zipkin formats |
| 10. Sampling | Sampling strategies |
| 11. AI Insights | An agent's investigation, step by step |
| 12. Multi-File | One request across services |
| 13. Live Watching | Tailing |
| 14. Performance | Large files |
| 15. Filtering | Field filters, complex queries |
| 16. Metrics | Numbers, statistics, outliers |
| 17. Format Detection | Formats and templates |
Documentation
| API reference | The Python API and its tested contracts |
| Agent command reference | Every logler llm command and flag |
| Python guide | Library usage |
| Configuration | Your own log formats and correlation rules |
| Timestamps | Which spellings of a time are read, and how the zone is decided |
| Request trees | How a request's spans are found and shown |
| Changelog | What changed, and what to change when upgrading |
| Web UI | A browser interface, in its own repository |
The -ler family
| Package | What it is |
|---|---|
| sqler | JSON documents in SQLite |
| qler | A background job queue built on sqler |
| logler | This package; --db reads log records from a sqler database |
Development
uv sync --extra dev # builds the Rust extension, installs the dev tools
uv run pytest
cargo test --workspace
uv sync --extra dev --reinstall-package logler # after a change to the Rust code
License
MIT. See LICENSE.
Metadata
Release files for logler 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| logler-2.0.0.tar.gz | 207.8 kB | With provenance | Details for logler-2.0.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| logler-2.0.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for logler-2.0.0-cp312-abi3-win_amd64.whl |
| logler-2.0.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ x86-64 | Details for logler-2.0.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| logler-2.0.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ ARM64 | Details for logler-2.0.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| logler-2.0.0-cp312-abi3-macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64 | Details for logler-2.0.0-cp312-abi3-macosx_11_0_arm64.whl |
| logler-2.0.0-cp312-abi3-macosx_10_12_x86_64.whl | CPython 3.12 | abi3 | macOS 10.12+ x86-64 | Details for logler-2.0.0-cp312-abi3-macosx_10_12_x86_64.whl |
Total release size: 7.9 MB
Release files / logler-2.0.0.tar.gz
| Download URL | logler-2.0.0.tar.gz |
|---|---|
| Size | 207.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd79e782fc04846baeec21a426e7d4e1afb8ba4f4253f29d4c55e73800940b88
|
|
BLAKE2b-256 checksum How to use checksums |
ae85863b87c71523ae0605896f5d23518612157d8c8ef2937edadc45f43e3d27
|
| 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 20, 2026.
Transparency logRelease files / logler-2.0.0-cp312-abi3-win_amd64.whl
| Download URL | logler-2.0.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2d2cb5ae7b2f8c91c2a61c804486ced5d6c731831d92da155e7aa5c1674e821a
|
|
BLAKE2b-256 checksum How to use checksums |
a53e4d572fc0a2c05ed0cdbeb59801480c5543daa0af63bee848b4961b547162
|
| 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 20, 2026.
Transparency logRelease files / logler-2.0.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | logler-2.0.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c1192f70420211a787f932cfff715f531751d6af3196bde61b3bc2d7a017548a
|
|
BLAKE2b-256 checksum How to use checksums |
3812afe91942b7972183adab995c722fbc016270e470ef0ed2ad43c2bc740c81
|
| 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 20, 2026.
Transparency logRelease files / logler-2.0.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | logler-2.0.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
d78e1466eb134e964f0c86d7211788e4105b5af62e26ac63e4b838172c128b16
|
|
BLAKE2b-256 checksum How to use checksums |
dbdf3cc4884d31dcf45541905ed12b98a10ad284556e8e74eef86cf26eac95c1
|
| 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 20, 2026.
Transparency logRelease files / logler-2.0.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | logler-2.0.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7da452eda598b0fdb16871debe7efe083aed91b8a610bad3dc2eb168f30c0c84
|
|
BLAKE2b-256 checksum How to use checksums |
891ea859532cb2892f9de5c573ded1b337e9c4e942349acb521118000777519d
|
| 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 20, 2026.
Transparency logRelease files / logler-2.0.0-cp312-abi3-macosx_10_12_x86_64.whl
| Download URL | logler-2.0.0-cp312-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8fcb8578a9307e44bcf47d6e9b17231857926f2f41b27e5a8f3747961b57a9f7
|
|
BLAKE2b-256 checksum How to use checksums |
99593b025f4b9a9eec2959442072b7ea524e0ae15f72c68bc27fce6fa546b437
|
| 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 20, 2026.
Transparency logSecurity for logler 2.0.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 6 files in this release have been uploaded with provenance metadata.
Attestation for logler-2.0.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 20, 2026.
Transparency logA 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.