View your log files in colour and in an easy to read format

lnav

This is a wonderful tutorial from the guys over at lintut.com to show how to navigate your way through log files easily.

Log files are notoriously difficult to read because it’s difficult in the sea of information to know what you are looking for.

The features of lnav are impressive:

  • Single log view: all log file contents are merged into a single view based on message timestamps. No need to manually correlate timestamps across multiple windows or figure out the order in which to view rotated log files.
  • Automatic format detection for several common log files. It also detects gzip/bzi2 files and decompress them automatically on the fly.
  • Filters: display only lines that match or do not match a set of regular expressions. Filter by error level.
  • Timeline view: shows a histogram of messages over time. The number of warnings and errors are highlighted in the display so that you can easily see where problems have occurred.
  • Query logs using SQL: log files are directly used as the backing for SQLite virtual tables.
  • Automatic data extraction: built-in log message parser can automatically discover and extract interesting data from plainly formatted log messages.
  • Live operation: Search as you type. New log lines are automatically loaded and searched as they are added; filters apply to lines as they are loaded; and, SQL queries are checked for correctness as you type.
  • Syntax highlighting with configurable colourizing
  • Tab completion
  • Sessions
  • Supports Linux and Mac

View the link over at lintut for the whole article:

Install and use Log File Navigator – lnav in Ubuntu and CentOS linux

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.