The Logfile Navigator
Summary
lnav is a terminal-based log file viewer that auto-detects formats, decompresses files on the fly, and merges multiple log sources into a single timeline. It includes a built-in SQLite interface for querying log data directly, and can outperform standard tools like grep/awk on large files (benchmarked against a 3.3 GB access log).
Key Insight
- Zero setup required - point it at a directory and it auto-detects log formats and handles compressed files transparently
- Built-in SQLite interface lets you run SQL queries against log data, which is far more powerful than chaining grep/awk/sed for complex analysis
- Outperforms standard terminal tools on large files in both CPU and memory usage - the project publishes benchmarks against a 3.3 GB access log
- No server component needed - runs entirely in the terminal, making it ideal for SSH sessions on remote servers
- Has a public SSH demo at
demo.lnav.orgso you can try it without installing - The SQLite interface can also generate charts, meaning you can do basic log visualization without leaving the terminal