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
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | Log file path or glob pattern |
lines | number | no | Number of tail lines to read (default: 100) |
level | string | no | Filter to ERROR, WARN, INFO, or DEBUG |
since | string | no | ISO timestamp — only return lines after this time |
collapse | boolean | no | Collapse repeated lines (default: true) |
Output format
Example
Savings baseline
A 10,000-line log file with 50 unique messages at 200 repetitions each returns in ~50 lines via collapse mode.
Related tools
ashlr__bash— rawtail -fequivalent for streaming