Log file navigator
Features:
Added mouse support that can be toggled with F2
or enabled
by default with: :config /ui/mouse/mode enabled
. With
mouse support enabled, many of the UI elements will respond to
mouse inputs:
:goto <current-line>
);(Note that this is new work, so there are likely to be some glitches.)
Added a journald://
URL handler that will call journalctl
and pass any query parameters as options. For example, the
following command:
$ lnav 'journal://?since=yesterday'
Will execute the following and capture the output:
journalctl --output=json -f --since=yesterday
Added the "last-word" line-format field shortening algorithm from @flicus.
Added a stats.hist
PRQL transform that produces a histogram
of values over time.
The preview for the :open
command will now show a listing
of archive contents.
Added humanize_id
SQL function that colorizes a string using
ANSI escape codes.
Added a selected_text
column to the lnav_views
table that
reports information about text that was selected with a mouse.
This makes it possible to script operations that use the
selected text as an input.
Added breadcrumb
as an option to the :prompt
command so
that the breadcrumb hotkey can be configured.
Interface changes:
The bar charts in the DB view have now been moved to their individual columns instead of occupying the whole width of the view. The result is much cleaner, so the charts are now enabled by default again.
Cursor mode in the main view is now the default instead of using the top line as the focus. You can change back by running:
:config /ui/movement/mode top
In the parser details panel (opened by pressing p
), you
can now hide/show fields by moving the cursor line to the
given field and pressing the space bar or by clicking on
the diamond with the mouse.
The sv
keymap binds §
to focus the breadcrumb bar.
Bug Fixes:
PAGER
.Features:
Added mouse support that can be toggled with F2
or enabled
by default with: :config /ui/mouse/mode enabled
. With
mouse support enabled, many of the UI elements will respond to
mouse inputs:
:goto <current-line>
);(Note that this is new work, so there are likely to be some glitches.)
Added a journald://
URL handler that will call journalctl
and pass any query parameters as options. For example, the
following command:
$ lnav 'journal://?since=yesterday'
Will execute the following and capture the output:
journalctl --output=json -f --since=yesterday
Added the "last-word" line-format field shortening algorithm from @flicus.
Added a stats.hist
PRQL transform that produces a histogram
of values over time.
The preview for the :open
command will now show a listing
of archive contents.
Added humanize_id
SQL function that colorizes a string using
ANSI escape codes.
Added a selected_text
column to the lnav_views
table that
reports information about text that was selected with a mouse.
This makes it possible to script operations that use the
selected text as an input.
Interface changes:
The bar charts in the DB view have now been moved to their individual columns instead of occupying the whole width of the view. The result is much cleaner, so the charts are now enabled by default again.
Cursor mode in the main view is now the default instead of using the top line as the focus. You can change back by running:
:config /ui/movement/mode top
In the parser details panel (opened by pressing p
), you
can now hide/show fields by moving the cursor line to the
given field and pressing the space bar or by clicking on
the diamond with the mouse.
Bug Fixes:
PAGER
.Features:
Added a journald://
URL handler that will call journalctl
and pass any query parameters as options. For example, the
following command:
$ lnav 'journal://?since=yesterday'
Will execute the following and capture the output:
journalctl --output=json -f --since=yesterday
Added the "last-word" line-format field shortening algorithm from @flicus.
Added a stats.hist
PRQL transform that produces a histogram
of values over time.
The preview for the :open
command will now show a listing
of archive contents.
Added humanize_id
SQL function that colorizes a string using
ANSI escape codes.
Added mouse support that can be toggled with F2
or enabled
by default with: :config /ui/mouse/mode enabled
. With
mouse support enabled, many of the UI elements will respond to
mouse inputs:
:goto <current-line>
);Added a selected_text
column to the lnav_views
table that
reports information about text that was selected with a mouse.
This makes it possible to script operations that use the
selected text as an input.
Interface changes:
The bar charts in the DB view have now been moved to their individual columns instead of occupying the whole width of the view. The result is much cleaner, so the charts are now enabled by default again.
Cursor mode in the main view is now the default instead of using the top line as the focus. You can change back by running:
:config /ui/movement/mode top
In the parser details panel (opened by pressing p
), you
can now hide/show fields by moving the cursor line to the
given field and pressing the space bar or by clicking on
the diamond with the mouse.
Bug Fixes:
PAGER
.Features:
;
,
if the query starts with from
, it will be treated as PRQL.
The pipeline structure of PRQL queries is more desirable for
interactive use since lnav can make better suggestions and
show previews of the stages of the pipeline.Interface changes:
;
),
the preview pane will show the results for the pipeline
stage the cursor is within along with the results of
the previous stage (if there is one). The preview
works on a limited data set, so the preview results
may differ from the final results.ESC
key can now be used to exit the files/filters
configuration panel instead of q
. This should make
it easier to avoid accidentally exiting lnav.:filter-in
the current
search term for the view will be suggested (if
one is active).:partition-name
command) is shown as the
first breadcrumb in the breadcrumb bar. And, when
that breadcrumb is selected, you can select another
partition to jump to.{
/ }
hotkeys, :next-section
, and :prev-section
commands now work in the LOG view and take you to the
next/previous partition.Breaking changes:
log_tags
) have been moved to after the columns
defined by the format. These columns are usually NULL
and are a distraction when previewing queries.Features:
;
,
if the query starts with from
, it will be treated as PRQL.
The pipeline structure of PRQL queries is more desirable for
interactive use since lnav can make better suggestions and
show previews of the stages of the pipeline.Interface changes:
;
),
the preview pane will show the results for the pipeline
stage the cursor is within along with the results of
the previous stage (if there is one). The preview
works on a limited data set, so the preview results
may differ from the final results.ESC
key can now be used to exit the files/filters
configuration panel instead of q
. This should make
it easier to avoid accidentally exiting lnav.:filter-in
the current
search term for the view will be suggested (if
one is active).:partition-name
command) is shown as the
first breadcrumb in the breadcrumb bar. And, when
that breadcrumb is selected, you can select another
partition to jump to.{
/ }
hotkeys, :next-section
, and :prev-section
commands now work in the LOG view and take you to the
next/previous partition.Breaking changes:
log_tags
) have been moved to after the columns
defined by the format. These columns are usually NULL
and are a distraction when previewing queries.Features:
;
,
if the query starts with from
, it will be treated as PRQL.
The pipeline structure of PRQL queries is more desirable for
interactive use since lnav can make better suggestions and
show previews of the stages of the pipeline.Interface changes:
;
),
the preview pane will show the results for the pipeline
stage the cursor is within along with the results of
the previous stage (if there is one). The preview
works on a limited data set, so the preview results
may differ from the final results.ESC
key can now be used to exit the files/filters
configuration panel instead of q
. This should make
it easier to avoid accidentally exiting lnav.:filter-in
the current
search term for the view will be suggested (if
one is active).:partition-name
command) is shown as the
first breadcrumb in the breadcrumb bar. And, when
that breadcrumb is selected, you can select another
partition to jump to.{
/ }
hotkeys, :next-section
, and :prev-section
commands now work in the LOG view and take you to the
next/previous partition.Breaking changes:
log_tags
) have been moved to after the columns
defined by the format. These columns are usually NULL
and are a distraction when previewing queries.Features:
;
,
if the query starts with from
, it will be treated as PRQL.
The pipeline structure of PRQL queries is more desirable for
interactive use since lnav can make better suggestions and
show previews of the stages of the pipeline.Interface changes:
;
),
the preview pane will show the results for the pipeline
stage the cursor is within along with the results of
the previous stage (if there is one). The preview
works on a limited data set, so the preview results
may differ from the final results.ESC
key can now be used to exit the files/filters
configuration panel instead of q
. This should make
it easier to avoid accidentally exiting lnav.:filter-in
the current
search term for the view will be suggested (if
one is active).:partition-name
command) is shown as the
first breadcrumb in the breadcrumb bar. And, when
that breadcrumb is selected, you can select another
partition to jump to.{
/ }
hotkeys, :next-section
, and :prev-section
commands now work in the LOG view and take you to the
next/previous partition.Breaking changes:
log_tags
) have been moved to after the columns
defined by the format. These columns are usually NULL
and are a distraction when previewing queries.Features:
:sh
command and -e
option 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 pressing Shift
+ 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.:cd
command to change lnav's current directory.converter
section 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.shell_exec()
SQLite function that executes a
command-line with the user's $SHELL
and returns the
output./tuning/url-schemes
. See the main docs for more details.docker://
and podman://
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
compose
as the host name with the path to the configuration
file (e.g. docker://compose/compose.yaml
).:annotate
command 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/annotations
configuration property.Z
) are now
automatically converted to the local time zone. For
example, a timestamp ending in -03:00
will 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-local
configuration
property to false
. Timestamps without a zone or have
a symbolic zone name (e.g. PDT
) are not converted.config get
and config blame
management CLI
commands to get the current configuration and the file
locations where the configuration options came from.:sh
command. The piped data can be managed using the
new piper
commands in the management CLI.$LNAV_HOME_DIR
and $LNAV_WORK_DIR
environment
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.<pre>
and <img>
tags are now recognized in
Markdown files.style
attribute in <span>
tags is now supported.
The following CSS properties and values are supported:
color
and background-color
with CSS color namesfont-weight
with a value of bold
or bolder
text-decoration
with underline
border-left
and border-right
with the solid
,
dashed
and dotted
line styles and colors.options
column to the lnav_views
table
to allow more control over overlays./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
/* ... */
) and strings
are now recognized and styled as appropriate.error
and data
columns to the fstat()
table-valued-function. The error
column is non-NULL
if there is a problem accessing the file. The data
contains the contents of the file, as such, it is
hidden by default.:eval
command will now treat its argument(s) as a
script, allowing multiple commands to be executed.timezone()
SQL function for converting a timestamp
to a target timezone.:convert-time-to
command that converts the
timestamp of the focused log message to the given timezone.:set-file-timezone
and :clear-file-timezone
commands to set the timezone for log messages that don't
include a zone in their timestamp.options_path
and options
columns to the
lnav_file
table 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-timezone
command.config file-options
management command that
can be used to examine the options that will be applied
to a given file.log_msg_line()
SQL function that will return the
line number of the start of the currently focused
message in the log view.log_msg_values
column to the all_logs
SQL
table that contains a JSON object with the top 5 values
for the fields extracted from the log message.:next-section
and :prev-section
commands for
moving to the next and previous section of a document.
For example, the next section in a man page or JSON
array. The default keymap has been changed to bind
the curly brace keys to these commands.Bug Fixes:
-I
option is now recognized in the management CLI
(i.e. when you run lnav with the -m
flag).-W
flag.jget(log_raw_text, '/...')
SQL
expression needed to retrieve the value.Interface changes:
`
instead of ENTER
.CTRL-]
. 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.){
and }
keys have been changed from moving
through the "location history" to moving to the previous
and next section in a document.Breaking changes:
-w
command-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.-t
command-line flag behaves a little differently
behind the scenes now. Timestamps will always be
recorded for each line piped into lnav. This flag means
that the data should be treated as a log file instead of
plain text.stdin-captures
dot-lnav
directory.bunyan
to
bunyan_log
to be consistent with other format names.Features:
:sh
command and -e
option 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 pressing Shift
+ 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.:cd
command to change lnav's current directory.converter
section 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.shell_exec()
SQLite function that executes a
command-line with the user's $SHELL
and returns the
output./tuning/url-schemes
. See the main docs for more details.docker://
and podman://
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
compose
as the host name with the path to the configuration
file (e.g. docker://compose/compose.yaml
).:annotate
command 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/annotations
configuration property.Z
) are now
automatically converted to the local time zone. For
example, a timestamp ending in -03:00
will 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-local
configuration
property to false
. Timestamps without a zone or have
a symbolic zone name (e.g. PDT
) are not converted.config get
and config blame
management CLI
commands to get the current configuration and the file
locations where the configuration options came from.:sh
command. The piped data can be managed using the
new piper
commands in the management CLI.$LNAV_HOME_DIR
and $LNAV_WORK_DIR
environment
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.<pre>
and <img>
tags are now recognized in
Markdown files.style
attribute in <span>
tags is now supported.
The following CSS properties and values are supported:
color
and background-color
with CSS color namesfont-weight
with a value of bold
or bolder
text-decoration
with underline
border-left
and border-right
with the solid
,
dashed
and dotted
line styles and colors.options
column to the lnav_views
table
to allow more control over overlays./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
/* ... */
) and strings
are now recognized and styled as appropriate.error
and data
columns to the fstat()
table-valued-function. The error
column is non-NULL
if there is a problem accessing the file. The data
contains the contents of the file, as such, it is
hidden by default.:eval
command will now treat its argument(s) as a
script, allowing multiple commands to be executed.timezone()
SQL function for converting a timestamp
to a target timezone.:convert-time-to
command that converts the
timestamp of the focused log message to the given timezone.:set-file-timezone
and :clear-file-timezone
commands to set the timezone for log messages that don't
include a zone in their timestamp.options_path
and options
columns to the
lnav_file
table 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-timezone
command.config file-options
management command that
can be used to examine the options that will be applied
to a given file.log_msg_line()
SQL function that will return the
line number of the start of the currently focused
message in the log view.log_msg_values
column to the all_logs
SQL
table that contains a JSON object with the top 5 values
for the fields extracted from the log message.Bug Fixes:
-I
option is now recognized in the management CLI
(i.e. when you run lnav with the -m
flag).-W
flag.jget(log_raw_text, '/...')
SQL
expression needed to retrieve the value.Interface changes:
`
instead of ENTER
.CTRL-]
. 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.)Breaking changes:
-w
command-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.-t
command-line flag. Text data fed in
on stdin and captured from a :sh
execution is
automatically timestamped.stdin-captures
dot-lnav
directory.bunyan
to
bunyan_log
to be consistent with other format names.Features:
auto-width
flag to the elements of the
line-format
array that indicates that the width of the
field should automatically be determined by the observed
values.line-format
array now default to being right-aligned. Also, added
prefix
and suffix
to line-format
elements so a
string can optionally be prepended/appended if the value
is not empty.line-format
is used. For example, if the first
log message has 8 fields and format A contains 5 of
those fields in its line-format
while format B only
contains 2 of those fields in its line-format
, format
A will be used for the file.Changes:
Bug Fixes: