log-triage
Paste a messy log, get a ranked diagnosis.
It reads a raw log the way a support engineer would: finds the distinct problems buried in thousands of repeated lines, puts the worst ones first, and tells you the likely cause plus the next command to run.
#1 CRITICAL db connection pool exhausted x142, bursting
likely cause: connections not returned under load
next: check pool size vs concurrent workers
#2 ERROR TLS handshake timeout to payments-api x38
likely cause: upstream cert or network path
next: openssl s_client -connect payments-api:443
#3 WARN retry queue depth rising x12, recent
3 distinct issues from 4,096 lines ยท exit code 2 (critical found)
Raw logs are noise: the same error repeated four thousand times, several formats mixed together, the real problem buried mid-file. This tool works out the format on its own (app logs, syslog, JSON lines, stack traces), collapses the repeats, and scores each distinct problem on how severe it is, how often it happens, how recent it is, and whether it is suddenly spiking. A knowledge base of about 25 rules then matches each problem to a likely cause and the next command worth running. It can also fail a CI build automatically when something critical shows up.
- log parsing
- format auto-detection
- rule-based diagnosis
- ranking heuristics
- zero dependencies
- 17 tests
weekend hack
What it actually took. Deliberately no AI in this one: support tooling has to give the same answer every time, work offline, and be explainable, so every ranking decision is a plain rule you can read in the source. The ranking weights came from a real test failure, where a sudden burst of errors mattered more than how recent they were, so bursts now outweigh recency in the score. Python standard library only, nothing to install.