summaryrefslogtreecommitdiffstats
path: root/docs/source/cli.rst
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/source/cli.rst97
1 files changed, 73 insertions, 24 deletions
diff --git a/docs/source/cli.rst b/docs/source/cli.rst
index 565e54f..93119e5 100644
--- a/docs/source/cli.rst
+++ b/docs/source/cli.rst
@@ -38,13 +38,19 @@ Options
Execute the given lnav command, SQL query, or lnav script. The
argument must be prefixed with the character used to enter the prompt
- to distinguish between the different types (i.e. ':', ';', '|').
- This option can be given multiple times.
+ to distinguish between the different types (i.e. :code:`:`, :code:`;`,
+ :code:`|`, :code:`/`). This option can be given multiple times.
.. option:: -f <path>
Execute the given command file. This option can be given multiple times.
+.. option:: -e <command-line>
+
+ Execute the given shell command-line and display its output. This is
+ equivalent to executing the :code:`:sh` command and passing the
+ :option:`-N` flag. This option can be given multiple times.
+
.. option:: -I <path>
Add a configuration directory.
@@ -76,23 +82,21 @@ Options
Recursively load files from the given base directories.
-.. option:: -t
-
- Prepend timestamps to the lines of data being read in on the standard input.
-
-.. option:: -w <path>
-
- Write the contents of the standard input to this file.
-
.. option:: -V
Print the version of lnav.
+.. option:: -v
+
+ Print extra information during operations.
+
.. option:: -q
- Do not print the log messages after executing all of the commands.
+ Do not print informational messages.
+.. _management_cli:
+
Management Mode (v0.11.0+)
--------------------------
@@ -107,12 +111,41 @@ Options
Switch to management mode. This must be the first option passed on the
command-line.
+.. option:: -I <path>
+
+ Add a configuration directory.
+
Subcommands
^^^^^^^^^^^
-.. option:: regex101 import <regex101-url> <format-name> [<regex-name>]
+.. option:: config get
- Convert a regex101.com entry into a skeleton log format file.
+ Print out the current configuration as JSON on the standard output.
+
+.. option:: config blame
+
+ Print out the configuration options as JSON-Pointers and the
+ file/line-number where the configuration is sourced from.
+
+.. option:: config file-options <path>
+
+ Print out the options that will be applied to the given file. The
+ options are stored in the :file:`file-options.json` file in the
+ **lnav** configuration directory. The only option available at
+ the moment is the timezone to be used for log message timestamps
+ that do not include a zone. The timezone for a file can be set
+ using the :ref:`:set-file-timezone<set_file_timezone>` command
+ and cleared with the :ref:`:clear-file-timezone<clear_file_timezone>`
+ command.
+
+.. option:: format <format-name> get
+
+ Print information about the given log format.
+
+.. option:: format <format-name> source
+
+ Print the name of the first file that contained this log format
+ definition.
.. option:: format <format-name> regex <regex-name> push
@@ -122,6 +155,22 @@ Subcommands
Pull changes to a regex that was previously pushed to regex101.com .
+.. option:: piper clean
+
+ Remove all of the files that stored data that was piped into **lnav**.
+
+.. option:: piper list
+
+ List all of the data that was piped into **lnav** from oldest to newest.
+ The listing will show the creation time, the URL you can use to reopen
+ the data, and a description of the data. Passing the :option:`-v`
+ option will print out additional metadata that was captured, such as
+ the current working directory of **lnav** and the environment variables.
+
+.. option:: regex101 import <regex101-url> <format-name> [<regex-name>]
+
+ Convert a regex101.com entry into a skeleton log format file.
+
Environment Variables
---------------------
@@ -142,27 +191,27 @@ Environment Variables
.. envvar:: TZ
- The timezone setting is used in some log formats to convert UTC timestamps
- to the local timezone.
+ The timezone setting is used in some log formats to convert timestamps
+ with a timezone to the local timezone.
Examples
--------
- To load and follow the system syslog file:
+To load and follow the system syslog file:
- .. prompt:: bash
+.. prompt:: bash
- lnav
+ lnav
- To load all of the files in :file:`/var/log`:
+To load all of the files in :file:`/var/log`:
- .. prompt:: bash
+.. prompt:: bash
- lnav /var/log
+ lnav /var/log
- To watch the output of make with timestamps prepended:
+To watch the output of make:
- .. prompt:: bash
+.. prompt:: bash
- make 2>&1 | lnav -t
+ lnav -e 'make -j4'