github tstack/lnav v0.8.2
lnav v0.8.2

latest releases: v0.12.2, v0.12.2-beta2, v0.12.2-beta1...
7 years ago

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.

Don't miss a new lnav release

NewReleases is sending notifications on new releases.