Releases: tstack/lnav
Releases · tstack/lnav
Beta1 release for v0.11.0
See the NEWS file for more details.
lnav v0.10.1
Features:
- Added ":show-only-this-file" command that hides all files except the
one for the top line in the view. - The ":write-raw-to" command now accepts a --view flag that specifies
the source view for the data to write. For example, to write the
results of a SQL query, you would pass "--view=db" to the command. - The commands used to access the clipboard are now configured through
the "tuning" section of the configuration. - Added an "lnav_version()" SQL function that returns the current
version string. - Added basic support for the logfmt file format. Currently, only files
whose lines are entirely logfmt-encoded are supported. The lines
must also contain either a field named "time" or "ts" that contains
the timestamp. - Added the "logfmt2json()" SQL function to convert a string containing
a logfmt-encoded message into a JSON object that can be operated on
more easily. - Added the "gzip()" and "gunzip()" SQL functions to compress values
into a blob and decompress a blob into a string.
Interface changes: - The xclip implementation for accessing the system clipboard now writes
to the "clipboard" selection instead of the "primary" selection. - The 'query' bookmark type and y/Y hotkeys have been removed due to
performance issues and the functionality is probably rarely used.
Bug Fixes:
- The text "send-input" would show up on some terminals instead of
ignoring the escape sequence. This control sequence was only
intended to be used in the test suite. - Remote file synchronization has been optimized a bit.
- Configuration values loaded from the ~/.lnav/configs directory
are now included in the default configuration, so they won't be
saved into the ~/.lnav/config.json user configuration file. - Key handling in the visual filter editor will no longer swallow
certain key-presses when editing a filter. - Scrolling performance restored in the SQL view.
- The ':redirect-to' command now works with '/dev/clipboard'
- The field overlay (opened by pressing 'p') now shows 'log_time'
for the timestamp field instead of the name defined in the format. - The search term in the bottom status bar will now update properly
when switching views. - The "Out-Of-Time-Order Message" overlay will be shown again.
- The tab for the "Files" panel will be highlighted in red if there
is an issue opening a file. - Overwritten files should be reloaded again.
- The "jget()" SQL function now returns numbers with the correct type.
- The "json_contains()" SQL function now returns false if the first
argument is NULL instead of NULL. - The local copies of remote files are now cleaned up after a couple
days of the host not being accessed. - The initial loading and indexing phase has been optimized.
lnav v0.10.1-beta1
Beta release for v0.10.1 that fixes a few regressions and other issues in the v0.10.0 release.
lnav v0.10.0
Features:
- Files on remote machines can be viewed/tailed if they are accessible
via SSH. The syntax for specifying the host and path is similar to
scp. For example, to view the files in the /var/log directory on the
machine "host1.example.org":
user@host1.example.org:/var/log
Note that you must be able to log into the machine without any
interaction. - Added the ':filter-expr' command to filter log messages based on an SQL
expression. This command allows much greater control over filtering. - Added the ':mark-expr' command to mark log messages based on an SQL
expression. This command makes it easier to programmatically mark
log messages compared to using SQL. - Added support for archive files, like zip, and other compression formats,
like xz, when compiled with libarchive. When one of these types of
files is detected, they are unpacked into a temporary directory and
all of the files are loaded into lnav. - Added an 'xpath()' table-valued function for extracting values from
strings containing XML snippets. - Added the ':prompt' command to allow for more customization of prompts.
Combined with a custom keymapping, you can now open a prompt and prefill
it with a given value. For example, a key could be bound to the
following command to open the command prompt with ":filter-in " already
filled in:
:prompt command : 'filter-in ' - Added support for the W3C Extended Log File Format with the name
"w3c_log". Similarly to the bro log format, the header is used to
determine the columns in a particular file. However, since the columns
can be different between files, the SQL table only has a well-known set
of columns and the remainder are accessible through JSON-objects stored
in columns like "cs_headers" and "sc_headers". - Added support for the S3 Access File Format.
- To jump to the first search hit above the top line in a view, you can
press CTRL+J instead of ENTER in the search prompt. Pressing ENTER
will jump to the first hit below the current window. - Filtering, as a whole, can be now disabled/enabled without affecting
the state of individual filters. This includes text and time-filters
(i.e. :hide-lines-before). You can enable/disable filtering by:
pressing 'f' in the filter editor UI; executing the ':toggle-filtering'
command; or by doing an UPDATE on the "filtering" column of the
"lnav_views" SQLite table. - Themes can now include definitions for text highlights under:
/ui/theme-defs/<theme_name>/highlights - Added a "grayscale" theme that isn't so colorful.
- Added the humanize_file_size() SQL function that converts a numeric size
to a human-friendly string. - Added the sparkline() SQL function that returns a "sparkline" bar made
out of unicode characters. It can be used with a single value or as
an aggregator. - Added a "log_time_msecs" hidden column to the log tables that returns
the timestamp as the number of milliseconds from the epoch. - Added an "lnav_top_file()" SQL function that can be used to get the
name of the top line in the top view or NULL if the line did not come
from a file. - Added a "mimetype" column to the lnav_file table that returns a guess as
to the MIME type of the file contents. - Added a "content" hidden column to the lnav_file table that can be used
to read the contents of the file. The contents can then be passed to
functions that operate on XML/JSON data, like xpath() or json_tree(). - Added an "lnav_top_view" SQL VIEW that returns the row for the top view
in the lnav_views table. - The "generate_series()" SQLite extension is now included by default.
One change from the standard implementation is that both the start and
stop are required parameters. - Added the ";.read" SQL command for executing a plain SQL file.
- Added the "-N" flag so that lnav will run without opening the default
syslog file.
Interface Changes:
- When copying log lines, the file name and time offset will be included
in the copy if they are enabled. - Log messages that cannot be parsed properly will be given an "invalid"
log level and the invalid portions colored yellow. - The range_start and range_stop values of the regexp_capture() results
now start at 1 instead of zero to match with what the other SQL string
functions expect. - The ":write-cols-to" command has been renamed to ":write-table-to".
- The DB view will limit the maximum column width to 120 characters.
- The ":echo" command now evaluates its message to do variable
substitution. - The ":write-raw-to" command has been changed to write the original
log file content of marked lines. For example, when viewing a JSON
log, the JSON-Line values from the log file will be written to the
output file. The ":write-view-to" command has been added to perform
the previous work of ":write-raw-to" where the raw content of the view
is written to the file.
Fixes:
- Unicode text can now be entered in prompts.
- The replicate() SQL function would cause a crash if the number of
replications was zero. - Many internal improvements.
lnav v0.10.0 Beta1
A beta release of lnav that leads up to the final v0.10.0 release.
The "musl" build is a statically linked 64-bit linux binary.
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.