diff --git a/docs/source/commands.rst b/docs/source/commands.rst index 507f5a66..83f3e92c 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -4,3 +4,61 @@ Command Reference ================= +This reference covers the commands used to control **lnav**. Consult the +`built-in help `_ in +**lnav** for a more detailed explanation of each command. + +Note that almost all commands support TAB-completion for their arguments, so +if you are in doubt as to what to type for an argument, you can double tap the +TAB key to get suggestions. + +Filtering +--------- + +The set of log messages that are displayed in the log view can be controlled +with the following commands: + +* filter-in - Only display log lines that match a regex. +* filter-out - Do not display log lines that match a regex. +* disable-filter - Disable the given filter. +* enable-filter - Enable the given filter. +* set-min-log-level - Only display log lines with the given log level + or higher. + +Navigation +---------- + +* goto - Go to the given line number, N percent into the + file, or the given timestamp in the log view. + +Time +---- + +* adjust-log-time - Change the timestamps for a log file. +* unix-time - Convert a unix-timestamp in seconds to a + human-readable form or vice-versa. +* current-time - Print the current time in human-readable form and as + a unix-timestamp. + +Display +------- + +* help - Display the built-in help text. + +* disable-word-wrap - Disable word wrapping in the log and text file views. +* enable-word-wrap - Enable word wrapping in the log and text file views. + +* highlight - Colorize text that matches the given regex. + +* switch-to-view - Switch to the given view name (e.g. log, text, ...) + +Output +------ + +* append-to - Append any bookmarked lines in the current view to the + given file. +* write-to - Overwrite the given file with any bookmarked lines in + the current view. +* write-csv-to - Write SQL query results to the given file in CSV format. +* write-json-to - Write SQL query results to the given file in JSON + format. diff --git a/docs/source/hotkeys.rst b/docs/source/hotkeys.rst index ddbe3657..fef2cbb4 100644 --- a/docs/source/hotkeys.rst +++ b/docs/source/hotkeys.rst @@ -36,7 +36,9 @@ Hotkey Reference } -This reference covers the keys used to control **lnav**. +This reference covers the keys used to control **lnav**. Consult the `built-in +help `_ in **lnav** for +a more detailed explanation of each key. Spatial Navigation ------------------ @@ -74,11 +76,11 @@ Spatial Navigation - - Right half a page * - |ks| Home |ke| - - + - |ks| g |ke| - - Top of the view * - |ks| End |ke| - - + - |ks| G |ke| - - Bottom of the view * - |ks| e |ke| @@ -109,6 +111,10 @@ Spatial Navigation - |ks| Shift |ke| + |ks| y |ke| - - Next/prevous SQL result + * - |ks| s |ke| + - |ks| Shift |ke| + |ks| s |ke| + - + - Next/prevous slow down in the log message rate Chronological Navigation ------------------------ @@ -174,7 +180,7 @@ Display - Switch to/from the text file view * - |ks| i |ke| - Switch to/from the histogram view - * - |ks| Shift |ke| + |ks| i |ke|- + * - |ks| Shift |ke| + |ks| i |ke| - Switch to/from the histogram view * - |ks| v |ke| - Switch to/from the SQL result view @@ -200,4 +206,6 @@ Query * - |ks| ; |ke| - Execute an SQL query * - |ks| : |ke| - - Execute an internal command + - Execute an internal command, see :ref:`commands` for more information + * - |ks| Ctrl |ke| + |ks| ] |ke| + - Abort a diff --git a/docs/source/lnav-ui.png b/docs/source/lnav-ui.png index 95f6b07c..b6769317 100644 Binary files a/docs/source/lnav-ui.png and b/docs/source/lnav-ui.png differ diff --git a/docs/source/ui.rst b/docs/source/ui.rst index 007a880a..64f14e01 100644 --- a/docs/source/ui.rst +++ b/docs/source/ui.rst @@ -18,13 +18,20 @@ On color displays, the log messages will be highlighted as follows: * Errors will be colored in red; * warnings will be yellow; +* search hits are reverse video; * various color highlights will be applied to: IP addresses, SQL keywords, 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). The right side of the display has a proportionally sized 'scrollbar' that -indicates your current position in the file. +shows: + +* your current position in the file; +* the locations of errors/warnings in the log files by using a red or yellow + coloring; +* the locations of search hits by using a tick-mark pointing to the left; +* the locations of bookmarks by using a tick-mark pointing to the right. Above and below the main body are status lines that display: @@ -34,7 +41,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 current search hit and the total number of hits; -* the number of lines not displayed because of filtering. +* the number of lines that are **not** displayed because of filtering. Finally, the last line on the display is where you can enter search patterns and execute internal commands, such as converting a