Skip to main content

Beautiful local log viewer with thread tracking and real-time updates

Project description

logler

Rust-powered log investigation for humans and AI agents

PyPI Downloads Python 3.9+ MIT Build

Rust black Ruff Platform Stars

English | 日本語


Install

pip install logler

Python 3.9+. Rust backend included for investigation features.

Quick Start

Python API:

import logler.investigate as investigate

results = investigate.search(files=["app.log"], level="ERROR", limit=5)
for entry in results["results"]:
    print(f"[{entry['entry']['level']}] {entry['entry']['message']}")

CLI:

logler llm search app.log --level ERROR --tail 5

See It in Action

git clone https://github.com/gabu-quest/logler.git && cd logler
uv run python demo.py

Interactive Tours

Learn logler hands-on with marimo notebooks. Each tour is self-contained with sample data -- no external files needed.

Launch Interactive Tour (browser)

Tour Topics
01. Fundamentals Search, filter, output formats
02. Thread Tracking Grouping, correlation IDs
03. Hierarchy Tree views, waterfall, bottleneck
All 17 tours
Tour Topics
01. Fundamentals Search, filter, output formats
02. Thread Tracking Grouping, correlation IDs
03. Hierarchy Tree views, waterfall, bottleneck
04. Investigation Sessions, history, report generation
05. Pattern Detection Repeated patterns, frequency analysis
06. Flamegraph Performance visualization
07. Error Flow Root cause analysis, propagation chains
08. Comparison Diff hierarchies, compare threads
09. Tracing Exports Jaeger and Zipkin formats
10. Sampling Smart sampling strategies
11. AI Insights LLM investigation workflow
12. Multi-File Cross-service distributed tracing
13. Live Watching Real-time tailing, streaming
14. Performance 10K+ entries, benchmarks
15. Filtering Field filtering, complex queries
16. Metrics Numeric values, stats, anomaly detection
17. Format Detection Auto-detect formats, Drain template mining

Run locally:

uv run marimo edit examples/tours/tour_01_fundamentals.py

Why Logler?

Log files are the black box of production. grep finds strings but not stories. Logler is a Rust-powered investigation engine that understands structure: threads, correlations, traces, hierarchies. Use it from Python, the CLI, or as an AI agent's investigation toolkit.

Performance

Real numbers from the benchmark suite (14 scenarios, Python 3.12, Rust backend):

Operation Result Context
Search throughput 257K entries/sec Level filter, 10K entries
Follow thread 2.6ms Correlation lookup, 1K entries
Cross-service timeline 13ms 5 services, shared correlation
Error flow analysis 1.7ms 10K entry hierarchy
Token savings 2540x count vs full, 100 ERRORs

Search scaling

Full report with 14 charts: benchmarks/results/REPORT.md

Honest limitations:

  • BSD syslog without <priority> prefix has no parsed timestamps
  • Time-based filtering unavailable for entries without timestamps

Features

Core

  • Multi-format parser: JSON, syslog (RFC 3164/5424, BSD), logfmt, Apache CLF, plain text
  • Thread tracking with correlation IDs and distributed traces
  • Real-time file watching and tailing
  • Rich terminal output with thread visualization

Investigation (Rust-powered)

  • Hierarchy detection with tree, waterfall, flamegraph views
  • Bottleneck analysis and error flow tracing
  • Cross-service timeline reconstruction
  • Pattern detection and smart sampling

LLM-Optimized

  • 25 CLI commands with structured JSON output
  • Token-efficient modes: summary, count, compact
  • Investigation sessions with undo/redo and report generation
  • Metrics extraction with z-score anomaly detection
  • Format auto-detection with Drain template mining
  • Custom formats and correlation rules via .logler.toml

When to Use Logler

Good fit:

  • Debugging production incidents (threads, correlations, traces)
  • AI agent log investigation (LLM-first JSON CLI)
  • Cross-service distributed tracing
  • Quick triage of large log files

Consider alternatives:

  • Need log aggregation/storage: ELK, Loki, Datadog
  • Need real-time alerting: Prometheus + Alertmanager
  • Only need grep-like search: ripgrep

Showcase

Thread Hierarchy

Build a request hierarchy from span/parent_span fields, with automatic bottleneck detection:

import logler.investigate as investigate

hierarchy = investigate.follow_thread_hierarchy(
    files=["app.log"],
    root_identifier="req-123",
    min_confidence=0.8,
)
if hierarchy.get("bottleneck"):
    bn = hierarchy["bottleneck"]
    print(f"Bottleneck: {bn['node_id']} ({bn['duration_ms']}ms)")
api-gateway (req-001, 520ms)
├─ auth-service (45ms)
│  ├─ jwt-validate (5ms)
│  └─ user-lookup (25ms)
├─ product-service (450ms) SLOW
│  ├─ inventory-check (340ms)
│  │  └─ db-query (300ms)
│  └─ cache-update (45ms) ERROR
└─ response-assembly (10ms)

Full tour | API reference

Cross-Service Timeline

Reconstruct a request's journey across microservices:

timeline = investigate.cross_service_timeline(
    files={"api": ["api.log"], "db": ["db.log"], "cache": ["cache.log"]},
    correlation_id="req-12345",
)
for event in timeline["timeline"]:
    print(f"[{event['service']}] {event['entry']['message']}")

Full tour | API reference

Error Flow Analysis

Trace error propagation through the request hierarchy:

error_flow = investigate.analyze_error_flow(
    files=["app.log"],
    root_identifier="req-123",
)
Error Flow Analysis

Root Cause:
  cache-update failed at 10:00:00.450Z
  Error: Redis connection refused
  Path: api-gateway -> product-service -> cache-update

Impact: 3 nodes affected, request degraded
Recommendation: Check Redis connectivity

Full tour | API reference

Visualization Modes

Tree View -- parent-child relationships:

api-gateway (req-001, 520ms)
├─ auth-service (45ms)
│  ├─ jwt-validate (5ms)
│  └─ user-lookup (25ms)
├─ product-service (450ms) SLOW
│  ├─ inventory-check (340ms)
│  │  └─ db-query (300ms)
│  └─ cache-update (45ms) ERROR
└─ response-assembly (10ms)

Waterfall View -- temporal overlap:

Timeline: req-001 (520ms)
api-gateway          ████████████████████████████████████████  520ms
  ├─ auth-service    ████                                      45ms
  ├─ product-service      ████████████████████████████████    450ms
  │  ├─ inventory              ██████████████████████         340ms
  │  └─ cache-update                              ████ ERR     45ms
  └─ response                                          ██      10ms

Flamegraph View -- time distribution:

┌────────────────────────────────────────────────────────────────────┐
│ api-gateway (520ms)                                                │
├───────────┬────────────────────────────────────────────────────────┤
│ auth (45) │ product-service (450ms)                                │
│           ├─────────────────────────────┬──────────────────────────┤
│           │ inventory-check (340ms)     │ cache-update (45ms) ERR  │
└───────────┴─────────────────────────────┴──────────────────────────┘

Error Flow -- propagation tracing:

Root Cause:
  cache-update failed at 10:00:00.450Z
  Error: Redis connection refused
  Path: api-gateway -> product-service -> cache-update

Impact: 3 nodes affected, request degraded

Documentation

Resource Description
API Reference Tested contracts (C02--C10)
LLM CLI Reference 25 commands with flags
Python API Guide Library API and examples
Investigation API All investigation functions
Interactive Tours 17 marimo notebooks
Performance Benchmarks and optimization
日本語ガイド Japanese documentation
Web UI Vue3 + Naive-UI interface

Testing

uv run pytest              # 1000+ Python tests
cargo test --workspace     # Rust tests

Contributing

uv run ruff format . && uv run ruff check .

Contributions welcome. Please submit a Pull Request.

License

MIT License -- see LICENSE for details.

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

logler-1.3.1.tar.gz (161.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

logler-1.3.1-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

logler-1.3.1-cp311-cp311-manylinux_2_34_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

logler-1.3.1-cp311-cp311-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

logler-1.3.1-cp311-cp311-macosx_10_12_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file logler-1.3.1.tar.gz.

File metadata

  • Download URL: logler-1.3.1.tar.gz
  • Upload date:
  • Size: 161.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for logler-1.3.1.tar.gz
Algorithm Hash digest
SHA256 76c565548e7770ea4398ee34c94c1e538c5b7925af96f2f7d61c2cbe1895e634
MD5 625b806447bf406a204813d4821adeaa
BLAKE2b-256 88ae1d636b87a59397d454a71c24a01aa743451edcde383a53e32870a17c1256

See more details on using hashes here.

Provenance

The following attestation bundles were made for logler-1.3.1.tar.gz:

Publisher: pypi.yml on gabu-quest/logler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file logler-1.3.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: logler-1.3.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for logler-1.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c8417d27087970f216f542b3d43c07f09c9a2135499bfed05526f389816acb84
MD5 ba76ada711cbfcf3b7634c361187a212
BLAKE2b-256 00d2808a6c3e472ac0d7ed2de173c6d20dc89a195b815787a059f6376f1fd53a

See more details on using hashes here.

Provenance

The following attestation bundles were made for logler-1.3.1-cp311-cp311-win_amd64.whl:

Publisher: pypi.yml on gabu-quest/logler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file logler-1.3.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for logler-1.3.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 027cee86598a7ff2f2cdb9e18692946ddc671a07ea3e2d015f00e18683435210
MD5 743bfee550808f0d0d87e72ee7b65586
BLAKE2b-256 608b28dd1b6d519060193406004b26a6f5614ffae2c391ff73007ab67d78a8cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for logler-1.3.1-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: pypi.yml on gabu-quest/logler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file logler-1.3.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for logler-1.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44aa441d936712e4c45e0b04b7279617386253690cb590348805a377a5dced52
MD5 8fe4d3c1c5c3c9ae7f777e8a6decef54
BLAKE2b-256 a9d70d059fe095a2526df336073475aeb297751ae80d15ad1eb193e8db34f930

See more details on using hashes here.

Provenance

The following attestation bundles were made for logler-1.3.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: pypi.yml on gabu-quest/logler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file logler-1.3.1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for logler-1.3.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5500ea82f38156eddabf712f0652ed632b116ba5327f1d0631ca0bb9d4716a06
MD5 d9506fd540109a3642760b3009aaaa1f
BLAKE2b-256 c8c912a6c2ca603b693ede20a15e3a8668f82735c0cd0f75ee65b27bdba2e793

See more details on using hashes here.

Provenance

The following attestation bundles were made for logler-1.3.1-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: pypi.yml on gabu-quest/logler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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