[docs] some more writing

This commit is contained in:
Timothy Stack 2013-08-26 07:20:01 -07:00
parent 94ce0ffd83
commit 49368e1513
8 changed files with 63 additions and 20 deletions

View File

@ -137,8 +137,8 @@ results.
:summarize col_0
Recognized Data
---------------
Recognized Data Types
---------------------
When searching for data to extract from log messages, **lnav** looks for the
following set of patterns:

View File

@ -82,7 +82,7 @@ Example format::
"url" : "http://example.com/log-format.html",
"regex" : {
"basic" : {
"value" : "^"
"pattern" : "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)>>(?<level>\\w+)>>(?<component>\\w+)>>(?<body>.*)$"
}
},
"level-field" : "level",
@ -98,7 +98,7 @@ Example format::
},
"sample" : [
{
"line" : ""
"line" : "2011-04-01T15:14:34.203Z>>ERROR>>core>>Shit's on fire yo!"
}
]
}
@ -107,4 +107,23 @@ Example format::
Modifying an Existing Format
----------------------------
When loading log formats from files, **lnav** will overlay any new data over
previously loaded data. This feature allows you to override existing value or
append new ones to the format configurations. For example, you can separately
add a new regex to the example log format given above by creating another file
with the following contents::
{
"example_log" : {
"regex" : {
"custom1" : {
"pattern" : "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)<<(?<level>\\w+)--(?<component>\\w+)>>(?<body>.*)$"
}
},
"sample" : [
{
"line" : "2011-04-01T15:14:34.203Z<<ERROR--core>>Shit's on fire yo!"
}
]
}
}

View File

@ -1,4 +1,6 @@
.. _hotkeys:
Hotkey Reference
================
@ -34,6 +36,8 @@ Hotkey Reference
}
</style>
This reference covers the keys used to control **lnav**.
Spatial Navigation
------------------

View File

@ -16,10 +16,9 @@ Contents:
intro
ui
sessions
formats
data
config
sessions
hotkeys
commands
sqlext

View File

@ -2,7 +2,7 @@
Introduction
============
The Log File Navigator, lnav, is an enhanced log file viewer that
The Log File Navigator, **lnav**, is an enhanced log file viewer that
takes advantage of any semantic information that can be gleaned from
the files being viewed, such as timestamps and log levels. Using this
extra semantic information, lnav can do things like interleaving
@ -25,7 +25,7 @@ doing::
Viewing Logs
------------
The arguments to **lnav** are simply the log files or directories to be viewed.
The arguments to **lnav** are the log files or directories to be viewed.
For example, to view all of the CUPS logs on your system::
$ lnav /var/log/cups
@ -34,7 +34,7 @@ The formats of the logs are determined automatically and indexed on-the-fly.
See :ref:`log-formats` for a listing of the predefined formats and how to
define your own.
If no arguments are given, **lnav** will try to open the default syslog file on
your system::
If no arguments are given, **lnav** will try to open the syslog file on your
system::
$ lnav

BIN
docs/source/lnav-ui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

View File

@ -2,3 +2,17 @@
Sessions
========
Session information is stored automatically for the set of files that were
passed in on the command-line and reloaded the next time lnav is executed.
The information currently stored is:
* Position within the files being viewed.
* Active searches for each view.
* Any active log filters or highlights.
Bookmarks and log-time adjustments are stored separately on a per-file basis.
Note that the bookmarks are associated with files based on the content of the
first line of the file so that they are preserved even if the file has been
moved from its current location.
Session data is stored in the "~/.lnav" directory.

View File

@ -2,21 +2,28 @@
User Interface
==============
The main part of the display shows the log lines from the files interleaved
based on time-of-day. New lines are automatically loaded as they are appended
to the files and, if you are viewing the bottom of the files, lnav will scroll
down to display the new lines, much like 'tail -f'.
The main part of the display shows the log messages from all files sorted by the
message time. Status bars at the top and bottom of the screen can given you an
idea of where you are in the logs. And, the last line is used for entering
commands. Navigation is controlled by a series of hotkeys, see :ref:`hotkeys`
for more information.
On color displays, the lines will be highlighted as follows:
.. figure:: lnav-ui.png
:align: center
:alt: Screenshot showing syslog messages.
Screenshot of **lnav** viewing syslog messages.
On color displays, the log messages will be highlighted as follows:
* Errors will be colored in red;
* warnings will be yellow;
boundaries between days will be underlined; and
* various color highlights will be applied to: IP addresses, SQL keywords,
XML tags, file and line numbers in Java backtraces, and quoted strings.
XML tags, file and line numbers in Java backtraces, and quoted strings;
* "identifiers" in the messages will be randomly assigned colors based on their
content (works best on "xterm-256color" terminals).
To give you an idea of where you are in the file spatially, the right
side of the display has a proportionally sized 'scrollbar' that
The right side of the display has a proportionally sized 'scrollbar' that
indicates your current position in the file.
Above and below the main body are status lines that display:
@ -27,7 +34,7 @@ Above and below the main body are status lines that display:
* the current view;
* the line number for the top line in the display;
* the total number of warnings and errors;
* the number of search hits, which updates as more are found; and
* the number of search hits; and
* the number of lines not displayed because of filtering.
Finally, the last line on the display is where you can enter search