lnav v0.15.0
Features:
- Added the
:filter-contextcommand to show lines surrounding filter matches, similar to grep's-Coption. The command accepts one or two arguments for the number of messages to show before and after each match. In the LOG view, context is counted in whole messages (including continuation lines). Thez/Zkeys can also be used to increase/decrease the context by one in the LOG, TEXT, and TIMELINE views. Context lines are styled using the newcontext-linetheme style. - Added a built-in
metrics_logformat that recognizes CSV files whose first column header isTime/Timestamp/ts/Date...and whose subsequent rows begin with a parseable timestamp. Each row is rendered with a timestamp and a<column>=<value>pair for each numeric column. Rows from multiple files that have the same timestamp are merged into a single line. Values are right-aligned and decorated with reverse-video bars proportional to each column's observed min/max range. When the row is focused, an overlay below it labels each column with the source file stem. Exports from Excel, PowerShell, and Grafana should be handled as-is. - Added the
all_metricsSQL virtual table, a long-format view across every open metrics file. Themetriccolumn contains the name of the metric andvaluecontains its value. - The TIMELINE view now supports overlaying metric
sparklines at the top of the view. The following commands
can be used to manage this:
:timeline-metric [<source>.]<metric>picks a column from any loaded metrics file:timeline-metric-sql <label> <query>takes an arbitrarySELECT log_time, value FROM ...that can target any table, including search-table columns.:clear-timeline-metric <label>removes metrics. Up to four metrics can be added.
- Added support for "tabular" formats (e.g. CSV, TSV).
The format definition for this type of file sets
file-typetotabularand then defines the known columns. When opening a file of this type, the separator will be automatically detected and the header compared against the columns defined in the tabular formats. If a good match is found, it will be used as the format for the file. Quoted cells that span multiple physical lines (an embedded LF inside"...") are stitched back into a single log message, so an Excel-exported CSV with a multi-line free-text column shows one logline per row and SQL/search operates on the merged cell value. - Added a log format for the
fsck_apfsandfsck_hfstools on macOS, covering both thestarted/completedlifecycle lines and legacyrunentries. This replaces the previousfsck_hfs_logformat, which only matched the start lines. The new format exposesdevice,tool, andactionfields, groups messages by device in the TIMELINE view, and highlightserror:lines andFILESYSTEM CLEANstatus messages. - Added a log format for the Asterisk PBX framework. The
call ID (e.g.
C-00000001) is used as the operation ID so the messages for a call are grouped in the TIMELINE view. - Log format value definitions now accept a
unitobject withsuffixanddivisorproperties.suffixspecifies how numeric fields are humanized.divisornormalizes the raw value to the base unit implied bysuffix— e.g. a field storing milliseconds with"suffix": "s"declares"divisor": 1000. - The details overlay now shows per-column statistics for
the focused message. Numeric columns get a
min..max of Nrange summary on the value line, plus ap50/p90/p99percentile sub-line for columns with enough samples to characterize the distribution shape. Identifier and metrics-text columns get an estimated distinct-value count (~K distinct of N). Distinct counts are computed from a HyperLogLog sketch (~4 KB per text col
