lnav v0.12.0
Features:
- Added a Gantt Chart view to visualize operations over time
based on the "opid" in log messages. The view shows
the operation IDs, a description of the operation captured
from log messages, and a bar representing the period of
time that the operation was running. - Added the
:shcommand and-eoption to execute a shell
command-line and display its output within lnav. The
captured output will be displayed in the TEXT view. The
lines from stdout and stderr are recorded separately so
that the lines from stderr can be shown in the theme's
"error" highlight. The time that the lines were received
are also recorded internally so that the "time-offset"
display (enabled by pressingShift+T) can be shown
and the "jump to slow-down" hotkeys (s/Shift+S)
work. Since the line-by-line timestamps are recorded
internally, they will not interfere with timestamps that
are in the commands output. - Added a
:cdcommand to change lnav's current directory. - Added support for automatically converting files that are
in a format not natively supported by lnav. The new
convertersection in a log format definition allows you
to specify how a file type can be detected and converted.
The built-in PCAP support in lnav is implemented using
this mechanism. - Added a
shell_exec()SQLite function that executes a
command-line with the user's$SHELLand returns the
output. - Added support for custom URL schemes that are handled by an
lnav script. Schemes can be defined under
/tuning/url-schemes. See the main docs for more details. - Added
docker://andpodman://URL schemes that can be
used to tail the logs for containers (e.g.
docker://my-container) or files within a container (e.g.
docker://my-serv/var/log/dpkg.log). Containers mentioned
in a "Compose" configuration file can be tailed by using
composeas the host name with the path to the configuration
file (e.g.docker://compose/compose.yaml). - Added an
:annotatecommand that can trigger a call-out
to a script to analyze a log message and generate an
annotation that is attached to the message. The script
is executed asynchronously, so it will not block input
and the result is saved in the session. Annotations are
defined in the/log/annotationsconfiguration property. - Timestamps with numeric timezone offsets (or
Z) are now
automatically converted to the local time zone. For
example, a timestamp ending in-03:00will be treated
as three hours behind UTC and then adjusted to the local
timezone. This feature can be disabled by setting the
/log/date-time/convert-zoned-to-localconfiguration
property tofalse. Timestamps without a zone or have
a symbolic zone name (e.g.PDT) are not converted. - Added the SQLite JSON functions to the online help.
- Added
config getandconfig blamemanagement CLI
commands to get the current configuration and the file
locations where the configuration options came from. - When piping data into lnav's stdin, the input used to
only be written to a single file without any rotation.
Now, the input is written to a directory of rotating files.
The same is true for the command-lines executed through the
new:shcommand. The piped data can be managed using the
newpipercommands in the management CLI. - The
$LNAV_HOME_DIRand$LNAV_WORK_DIRenvironment
variables are now defined inside lnav and refer to
the location of the user's configuration directory and
the directory where cached data is stored, respectively. - The
<pre>and<img>tags are now recognized in
Markdown files. - The
styleattribute in<span>tags is now supported.
The following CSS properties and values are supported:colorandbackground-colorwith CSS color namesfont-weightwith a value ofboldorboldertext-decorationwithunderlineborder-leftandborder-rightwith thesolid,
dashedanddottedline styles and colors.
- Added an
optionscolumn to thelnav_viewstable
to allow more control over overlays. - Added a "Dracula" theme as described at:
https://draculatheme.com - Added the following styles for themes:
/ui/theme-defs/<theme_name>/syntax-styles/inline-code/ui/theme-defs/<theme_name>/syntax-styles/type/ui/theme-defs/<theme_name>/syntax-styles/function/ui/theme-defs/<theme_name>/syntax-styles/separators-references-accessors
- Multi-line block comments (i.e.
/* ... */) and strings
are now recognized and styled as appropriate. - Added
erroranddatacolumns to thefstat()
table-valued-function. Theerrorcolumn is non-NULL
if there is a problem accessing the file. Thedata
contains the contents of the file, as such, it is
hidden by default. - Added a log format for Redis.
- The
:evalcommand will now treat its argument(s) as a
script, allowing multiple commands to be executed. - Added a
timezone()SQL function for converting a timestamp
to a target timezone. - Added a
:convert-time-tocommand that converts the
timestamp of the focused log message to the given timezone. - Added the
:set-file-timezoneand:clear-file-timezone
commands to set the timezone for log messages that don't
include a zone in their timestamp. - Added the
options_pathandoptionscolumns to the
lnav_filetable so you can see what options are applied
to a file. Currently, the only option is the default
timezone that is set by the:set-file-timezonecommand. - Added the
config file-optionsmanagement command that
can be used to examine the options that will be applied
to a given file. - When viewing a diff, the sections of the diff for each
file is recognized and shown in the breadcrumb bar. So,
you can see the file the focused line is in. You can
also jump to a particular file by focusing on the
breadcrumb bar, selecting the crumb, and then selecting
the desired file. - Binary files are now displayed as a hex dump with ASCII
representation (where applicable). - Added a
log_msg_line()SQL function that will return the
line number of the start of the currently focused
message in the log view. - Added a
log_msg_valuescolumn to theall_logsSQL
table that contains a JSON object with the top 5 values
for the fields extracted from the log message. - Added Nextcloud log format from Adam Monsen.
Bug Fixes:
- Binary data piped into stdin should now be treated the same
as if it was in a file that was passed on the command-line. - The
-Ioption is now recognized in the management CLI
(i.e. when you run lnav with the-mflag). - Fields in the bro and w3c log formats that were hidden are
now saved in the session and restored. - A warning will now be issued if a timestamp in a log format's
sample message does not match completely. Warnings in the
configuration can be viewed by passing the-Wflag. - Importing from regex101.com broke due to some changes in the
API. - The details overlay for a log message no longer shows keys
for unknown JSON properties. These extra fields are now
shown with the properjget(log_raw_text, '/...')SQL
expression needed to retrieve the value. - Improved text-wrapping when rendering Markdown.
Interface changes:
- The breadcrumb bar hotkey is moving to backtick
`
instead ofENTER. - The DB view now uses the "alt-text" theme style to draw
alternating rows instead of being hard-coded to bold. The
alternation is also now done in groups of two rows instead
of only a single row. Numbers are also rendered using the
"number" theme style as well. - The log message overlay in the LOG view is now limited
2/3rds of the height. You can focus on the overlay panel
by pressingCTRL-]. The "alt-text" theme style is also
used to draw the overlay contents now as well. (The
overlay is used to display the parser details, comments,
and annotations.) - Added indent guidelines when structured data is detected.
Breaking changes:
- Removed the
-wcommand-line option. This option was
useful when stdin was not automatically preserved. Since
the data is now stored (and cleaned up) as well as being
spread across multiple files, this option doesn't make
sense anymore. - Removed the
-tcommand-line flag. Text data fed in
on stdin and captured from a:shexecution is
automatically timestamped. - Data piped into lnav is now stored in the work
directory instead of thestdin-capturesdot-lnav
directory. - Changed the "Bunyan" log format name from
bunyanto
bunyan_logto be consistent with other format names.