Log file navigator with search, filtering, and SQL queries
LNAV (Logfile Navigator) is a sophisticated terminal-based log file viewer designed to make analyzing log files more efficient and intuitive. Unlike basic Unix utilities like tail, grep, or less, lnav understands the structure of log messages and can intelligently merge multiple log files by timestamp, automatically detect formats, decompress files, and follow file rotations in real-time.
The tool excels at handling complex logging scenarios by providing advanced features like semantic highlighting of identifiers (IP addresses, PIDs), automatic error and warning indexing, and pretty-printing of JSON-lines format. Users can quickly navigate between errors with hotkeys, filter messages using regular expressions or SQLite expressions, and even perform SQL analysis directly on log data.
LNAV is particularly valuable for system administrators, DevOps engineers, and developers who need to monitor and troubleshoot systems by analyzing multiple log files simultaneously. Its ability to provide a unified view of logs from different sources, combined with powerful search and filtering capabilities, makes it an essential tool for anyone dealing with substantial log analysis tasks.
# via Homebrew
brew install lnav
# via Binary download
Download from https://github.com/tstack/lnav/releases/latest
