ashlr

ashlr__logs

Token-efficient log tail. Detects severity, filters by level or timestamp, collapses repeated lines.

Server: ashlr-logs — servers/logs-server.ts

Reads the last N lines of a log file (or glob), detects severity with a suite of common patterns, optionally filters by level and/or timestamp, and collapses runs of identical lines into "(42x) same message".

Severity detection

Handles: bracketed [ERROR], bare error:, Python tracebacks, JSON {"level": "error"}, syslog format, and more. Unrecognized lines are classified as INFO.

Input schema

FieldTypeRequiredDescription
pathstringyesLog file path or glob pattern
linesnumbernoTail window (default 200)
levelstringnoFilter to ERROR, WARN, INFO, or DEBUG
sincestringnoISO timestamp — only return lines after this time
dedupebooleannoCollapse repeated consecutive lines with count (default: true)
bypassSummarybooleannoIf true, skip LLM summarization and return the full rendered log tail.

Output format

[ashlr__logs] /var/log/app.log  ·  last 100 lines  ·  3 ERROR, 7 WARN

2024-01-15 09:23:14 [ERROR] Connection refused to postgres://...
2024-01-15 09:23:15 [ERROR] Retry 1/3...
(2x) same message
2024-01-15 09:23:18 [ERROR] Max retries exceeded

Example

Use ashlr__logs to tail /var/log/nginx/error.log filtering for ERROR

Savings baseline

A 10,000-line log file with 50 unique messages at 200 repetitions each returns in ~50 lines with dedupe on (the default).

On this page