Releases: tstack/lnav
Releases · tstack/lnav
lnav v0.9.0
Features
- Added support for themes and included a few as well: default, eldar,
monocai, night-owl, solarized-light, and solarized-dark. The theme
can be changed using the ':config' command, like so:
:config /ui/theme night-owl
Consult the online documentation for defining a new theme at:
https://lnav.readthedocs.io/en/latest/config.html#theme-definitions - Added support for custom keymaps and included the following: de, fr,
uk, us. The keymap can be changed using the ':config' command, like so:
:config /ui/keymap uk
Consult the online documentation for defining a new keymap at:
https://lnav.readthedocs.io/en/latest/config.html#keymap-definitions - The following JSON-Schemas have been published for the log format and
configuration JSON files:
https://lnav.org/schemas/format-v1.schema.json
https://lnav.org/schemas/config-v1.schema.json
Formats should be updated to reference the schema using the "$schema"
property. - Indexing of new data in log files can now be paused by pressing '='
and unpaused by pressing it again. The bottom status bar will display
'Paused' in the right corner while paused. - CMake is now a supported way to build.
- When viewing data from the standard-input, a symbolic name can be used
to preserve session state. The name can be changed using the
"rename-stdin" lnav script or by doing an UPDATE to the filepath
column of the lnav_file table. For example, to assign the name
"journald", the following SQL statement can be executed in lnav:
;UPDATE lnav_file SET filepath='journald' WHERE filepath='stdin'
- The size of the terminal can be accessed in SQL using the $LINES and
$COLS variables. - The raise_error(msg) SQL function has been added to make it easier to
raise an error in an lnav script to stop execution and notify the user. - Added the
json_concat()
function to make it easier to append/concatenate
values onto arrays. - Added the ":write-jsonlines-to" command that writes the result of a SQL
query to a file in the JSON Lines format.
Interface Changes
- Data piped into lnav is no longer dumped to the console after exit.
Instead a file containing the data is left in .lnav/stdin-captures/
and a message is printed to the console indicating the file name. - In time-offset mode, the deltas for messages before the first mark
are now negative instead of relative to the start of the log. - The
$XDG_CONFIG_HOME
environment variable (or~/.config
directory) are
now respected for storing lnav's configuration. If you have an existing
~/.lnav
directory, that will continue to be used until you move it to
$XDG_CONFIG_HOME/lnav
or~/.config/lnav
. - Removed the ':save-config' command. Changes to the configuration are now
immediately saved.
Fixes
- Added 'notice' log level.
- If a "timestamp-format" is used in an element of a "line-format", the
field name is ignored and a formatted timestamp is always used. - Ignore stdin when it is connected to /dev/null.
Release Artifacts
- lnav-0.9.0-musl-64bit.zip: Contains a fully statically linked version of lnav for Linux.
- lnav-0.9.0-linux-64bit.zip: A "mostly" statically linked zip that contains an lnav binary for Linux. Requires a recent version of glibc.
- lnav_0.9.0_amd64.deb, lnav-0.9.0-1.x86_64.rpm: 64-bit binary packages for Debian and RPM that contain the above binary.
- lnav-0.9.0a-os-x.zip: A statically linked version of lnav for MacOS. (The 'a' version fixes an issue with some libraries not being statically linked)
- lnav-0.9.0-freebsd-64bit.zip: A build for FreeBSD
- lnav-0.9.0.tar.gz, lnav-0.9.0.tar.bz2: Source packages.
v0.9.0-rc1
Release candidate 1 for v0.9.0
See the https://github.com/tstack/lnav/blob/v0.9.0-rc1/NEWS file for more information.
lnav v0.8.5
Features:
- Added a visual filter editor to make it easier to update existing
filters. The editor can be opened by pressing TAB. Once the editor
is opened, you can create/delete, enable/disable, and edit the patterns
with hotkeys. - Added an 'lnav_view_filters' SQL table that can be used to
programmatically manipulate filters. - Added an 'lnav_view_filter_stats' SQL table that contains the number of
times a given filter matched a line in the view. - Added a 'log_filters' column to log tables that can be used to see what
filters matched the log message. - A history of locations in a view is now kept so that you can jump back
to where you were previously using the '{' and '}' keys. The location
history can also be accessed through the ":prev-location" and
":next-location" commands. - The ":write-*" commands will now accept "/dev/clipboard" as a file name
that writes to the system clipboard. - The ":write-to" and ":write-raw-to" commands will now print out comments
and tags attached to the lines. - Added a ":redirect-to " command to redirect command output to the
given file. This command is mostly useful in scripts where one might
want to redirect all output from commands like ":echo" and ":write-to -"
to a single file. - If a log file format has multiple patterns for matching log messages,
each pattern is now tried to match a message in a file. Previously,
only one pattern was ever used for an entire file. - Added haproxy log format from Peter Hoffmann.
- Added 'spooky_hash()' and 'group_spooky_hash()' SQL functions to
generate a hash of their parameters. - Added 'time_offset' to the 'lnav_file' table so that the timestamps in
a file can be adjusted programmatically.
Interface Changes:
- The auto-complete behavior in the prompt has been modified to fall back
to a fuzzy search if the prefix search finds no matches. For example,
typing in ":fin" and pressing TAB would previously not do anything.
Now, the ":fin" will be completed to ":filter-in " since that is a
strong fuzzy match. If there are multiple matches, as would happen
with ":dfil", readline's menu-complete behavior will be engaged and
you can press TAB cycle through the options. - Added CTRL+F to toggle the enabled/disabled state of all filters for the
current view. - The '-r' flag is now for recursively loading files. The functionality
for loading rotated files is now under the '-R' flag. - The current search term is now shown in the bottom status bar.
- Some initial help text is now shown for the search and SQL prompts to
refresh the memory. - When entering the ":comment" command for a line with a comment, the
command prompt will be filled in with the existing comment to make
editing easier. - Hidden fields now show up as a unicode vertical ellipsis (⋮) instead of
three-dot ellipsis to save space. - Pressing 7/8 will now move to the previous/next minute.
- The ":write-raw-to" command has been changed to write the entire
contents of the current view and a ":write-screen-to" command has been
added to write only the current screen contents. - Disabled filters are now saved in sessions.
- The ":adjust-log-time" command now accepts relative times as input.
Fixes:
- The ":write-json-to" command will now pass through JSON cells as their
JSON values instead of a JSON-encoded string.
v0.8.5 Release Candidate 1
Features:
- Added a visual filter editor to make it easier to update existing
filters. The editor can be opened by pressing TAB. Once the editor
is opened, you can create/delete, enable/disable, and edit the patterns
with hotkeys. - Added an 'lnav_view_filters' SQL table that can be used to
programmatically manipulate filters. - Added an 'lnav_view_filter_stats' SQL table that contains the number of
times a given filter matched a line in the view. - Added a 'log_filters' column to log tables that can be used to see what
filters matched the log message. - A history of locations in a view is now kept so that you can jump back
to where you were previously using the '{' and '}' keys. The location
history can also be accessed through the ":prev-location" and
":next-location" commands. - The ":write-*" commands will now accept "/dev/clipboard" as a file name
that writes to the system clipboard. - The ":write-to" and ":write-raw-to" commands will now print out comments
and tags attached to the lines. - Added a ":redirect-to " command to redirect command output to the
given file. This command is mostly useful in scripts where one might
want to redirect all output from commands like ":echo" and ":write-to -"
to a single file. - If a log file format has multiple patterns for matching log messages,
each pattern is now tried to match a message in a file. Previously,
only one pattern was ever used for an entire file. - Added haproxy log format from Peter Hoffmann.
- Added 'spooky_hash()' and 'group_spooky_hash()' SQL functions to
generate a hash of their parameters. - Added 'time_offset' to the 'lnav_file' table so that the timestamps in
a file can be adjusted programmatically.
Interface Changes:
- The auto-complete behavior in the prompt has been modified to fall back
to a fuzzy search if the prefix search finds no matches. For example,
typing in ":fin" and pressing TAB would previously not do anything.
Now, the ":fin" will be completed to ":filter-in " since that is a
strong fuzzy match. If there are multiple matches, as would happen
with ":dfil", readline's menu-complete behavior will be engaged and
you can press TAB cycle through the options. - Added CTRL+F to toggle the enabled/disabled state of all filters for the
current view. - The '-r' flag is now for recursively loading files. The functionality
for loading rotated files is now under the '-R' flag. - The current search term is now shown in the bottom status bar.
- Some initial help text is now shown for the search and SQL prompts to
refresh the memory. - When entering the ":comment" command for a line with a comment, the
command prompt will be filled in with the existing comment to make
editing easier. - Hidden fields now show up as a unicode vertical ellipsis (⋮) instead of
three-dot ellipsis to save space. - Pressing 7/8 will now move to the previous/next minute.
- The ":write-raw-to" command has been changed to write the entire
contents of the current view and a ":write-screen-to" command has been
added to write only the current screen contents. - Disabled filters are now saved in sessions.
- The ":adjust-log-time" command now accepts relative times as input.
Fixes:
- The ":write-json-to" command will now pass through JSON cells as their
JSON values instead of a JSON-encoded string.
lnav v0.8.4
Features:
- Added the ':comment' command that can be used to attach a comment to a
log line. The comment will be displayed below the line, like so:
2017-01-01T15:30:00 error: computer is on fire
+ This is where it all went wrong
The ':clear-comment' command will remove the attached comment. Comments
are searchable with the standard search mechanism and they are available
in SQL through the "log_comment" column. - Added the ':tag', ':untag', and ':delete-tags' commands that can be used
to attach/detach tags on the top log line and delete all instances of
a tag. Tags are also searchable and are available in SQL as a JSON
array in the "log_tags" column. - Pressing left-arrow while viewing log messages will reveal the source
file name for each line and the unique parts of the source path.
Pressing again will reveal the full path. - The file name section of the top status line will show only the unique
parts of the log file path if there is not enough room to show the full
path. - Added the ":hide-unmarked-lines" and ":show-unmarked-lines" commands
that hide/show lines based on whether they are bookmarked. - Added the "json_contains()" SQL function to check if a JSON value
contains a number of a string. - The relative time parser recognizes "next" at the beginning of the
input, for example, "next hour" or "next day". Handy for use in the
":goto" command. - Added a "text-transform" option for formatting JSON log messages. The
supported options are: none, uppercase, lowercase, and capitalize. - Added a special "level" field name for formatting JSON messages so
that the lnav level name can be used instead of the internal value in
the JSON object. - Added a log format for journald JSON logs.
Interface Changes:
- When typing in a search, instead of moving the view to the first match
that was found, the first ten matches will be displayed in the preview
window. - The pretty-print view maintains highlighting from the log view.
- The pretty-print view no longer tries to reverse lookup IP addresses.
- The online help for commands and SQL functions now includes a 'See Also'
section that lists related commands/functions.
Fixes:
- The HOME key should now work in the command-prompt and move the cursor
to the beginning of the line. - The :delete-filter command should now tab-complete existing filters.
- Milliseconds can now be used in relative times (e.g. 10:00:00.123)
- The J/K hotkeys were not marking lines correctly when the bottom of
the view was reached. - The level field in JSON logs should now be recognized by the level
patterns in the format.
v0.8.3b
v0.8.3a
lnav v0.8.3
Features:
- Support for the Bro Network Security Monitor (https://www.bro.org) log file format.
- Added an fstat() table-valued function for querying the local filesystem.
- Added readlink() and realpath() SQL functions.
- Highlights specified in log formats can now specify the colors to use for the highlighted parts of the log message.
- Added a ":quit" command.
- Added a "/ui/default-colors" configuration option to specify that the terminal's default background and foreground colors should be used instead of black and white.
Interface Changes:
- Pressing delete at a command-prompt will exit the prompt if there is no other input.
Fixes:
- The help view now includes all the command-help that would pop up as you entered commands and SQL queries.
- Hidden fields and lines hidden before/after times are now saved in the current session and restored.
- Unicode characters should now be displayed correctly (make sure you have LANG set to a UTF-8 locale).
v0.8.3-alpha: [perf] avoid an initial forced index rebuild
Defect Number: Reviewed By: Testing Done:
lnav v0.8.2
Features:
- The timestamp format for JSON log files can be specified with the
"timestamp-format" option in the "line-format" array. - Added "min-width", "max-width", "align", and "overflow" options to the
"line-format" in format definitions for JSON log files. These options
give you more control over how the displayed line looks. - Added a "hidden" option to log format values so that you can hide JSON
log fields from being displayed if they are not in the line format. - Added a "rewriter" field to log format value definitions that is a
command used to rewrite the field in the pretty-printed version of a
log message. For example, the HTTP access log format will rewrite the
status code field to include the textual version (e.g. 200 (OK)). - Log message fields can now be hidden using the :hide-fields" command or
by setting the 'hidden' property in the log format. When hidden, the
fields will be replaced with a yellow ellipsis when displayed. Hiding
large fields that contain extra details can make the log easier to read.
The 'x' hotkey can be used to quickly toggle whether these fields are
displayed or not. - Added a ':mark' command to bookmark the top line in the current view.
- Added an ':alt-msg' command that can be used to set the text to be
displayed in the bottom right of the command line. This command is
mostly intended for use by hotkey maps to set the help text. - In lnav scripts, the first row of a SQL query result will now be turned
into local variables that can be referenced in other commands or
queries. For example, the following script will print the number one:
;SELECT 1 as foobar
:eval :echo ${foobar} - Added an 'lnav_view_stack' SQL table that gives access to the view
stack. - Added a 'top_time' column to the lnav_views table so that you can get
the timestamp for the top line in views that are time-based as well as
allowing you to move the view to a given time with an UPDATE statement. - Added a 'search' column to the lnav_views table so that you can perform
a text search programmatically. - Added a 'regexp_capture(, )' table-valued function for
getting detailed results from matching a regular expression against a
string. - Added a 'timediff(, )' SQL function for computing the
difference between two relative or absolute timestamps. - Log formats can now define a default set of highlights with the
"highlights" property. - Added a '|search-for ' built-in script that can be used to
start a search from the command-line. - Log format definitions can now specify the expected log level for a
sample line. This check should make it easier to validate the
definition.
Interface Changes:
- Command and SQL documentation is now displayed in a section at the
bottom of the screen when a command or query is being entered. Some
commands will also display a preview of the command results. For
example, the ':open' command will display the first ten lines of the
file to be opened and the ':filter-out' command will highlight text
that matches in the current view. The preview pane can be shown/hidden
by pressing CTRL-P. - The color used for text colored via ":highlight" is now based on the
the regex instead of randomly picked so that colors are consistent
across invocations. - The "graph" view has been removed since it's functionality has been
obsoleted by other features, like ":create-search-table". - When doing a search, if a hit is found within a second after hitting
, the view will move to the matched line. The previous behavior
was to stay on the current line, which tended to be a surprise to new
users. - Pressing 'n'/'N' to move through the next/previous search hit will now
skip adjacent lines, up to the vertical size of the view. This should
make scanning through clusters of hits much faster. Repeatedly
pressing these keys within a short time will also accelerate scanning
by moving the view at least a full page at a time.
Breaking Changes:
- The captured timestamp text in log files must fully match a known format
or an error will be reported. The previous behavior was to ignore any
text at the end of the line.
Fixes:
- You can now execute commands from the standard input by using a dash (-)
with the '-f' command-line argument. Reading commands from a file
descriptor should also work, for example, with the following bash
syntax:
$ lnav -f <(echo :open the-file-to-open)
- Programming language syntax highlighting should now only be applied to
source code files instead of everywhere.