summaryrefslogtreecommitdiffstats
path: root/lnav.1
blob: bdf349bce00df0dc63405bd04f81bf78d4a1722a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.\" Define macros
.de Vb \" Begin verbatim text                                                                                                                                                       
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.TH LNAV "1" "April 2024"
.SH NAME
lnav \- log file viewer for the terminal
.SH SYNOPSIS
.B lnav 
[options] [logfile1 logfile2 ...]
.SH DESCRIPTION
The Logfile Navigator, lnav, is a log file viewer for the terminal.
Given a set of files/directories, lnav will:
.TP
- decompress as needed;
.TP
- detect their format;
.TP
- merge the files together by time into a single view;
.TP
- tail the files, follow renames, find new files in directories;
.TP
- build an index of errors and warnings;
.TP
- pretty-print JSON-lines.
.SH KEY BINDINGS
.TP
?
View/leave the online help text.
.TP
q
Quit the program.
.SH OPTIONS
.TP
\fB\-h\fR
Print help and exit
.TP
\fB\-H\fR
Display the internal help text.
.TP
\fB\-I\fR path
Add the given configuration directory to the search path.
.TP
\fB\-W\fR
Print warnings related to lnav's configuration.
.TP
\fB\-u\fR
Update formats installed from git repositories.
.TP
\fB\-d\fR file
Write debug messages to the given file.
.TP
\fB\-V\fR
Print version information.
.TP
\fB\-r\fR
Recursively load files from the given directories.
.TP
\fB\-R\fR
Load older rotated log files as well.
.TP
\fB\-c\fR cmd
Execute a command after the files have been loaded.
.TP
\fB\-f\fR path
Execute the commands in the given file.
.TP
\fB\-e\fR cmd
Execute a shell command-line.
.TP
\fB\-t\fR
Prepend timestamps to the lines of data being read in
on the standard input.
.TP
\fB\-n\fR
Run without the curses UI.  (headless mode)
.TP
\fB\-N\fR
Do not open the default syslog file if no files are given.
.TP
\fB\-q\fR
Quiet mode.  Do not print the log messages after executing all of the commands.
.SS "Optional arguments:"
.TP
logfile1
The log files or directories to view.  If a
directory is given, all of the files in the
directory will be loaded.
.SH MANAGEMENT-MODE OPTIONS
.TP
\fB\-i\fR
Install the given format files in the $HOME/.lnav/formats/installed directory
and exit.
.TP
\fB\-m\fR
Switch to the management command-line mode.  This mode is
used to work with lnav's configuration.
.TP
\fB\-C\fR
Check the configuration and exit.  The log format files will be loaded and
checked.  Any files given on the command-line will be loaded checked to make
sure they match a log format.
.SH EXAMPLES
To load and follow the syslog file:
.PP
.Vb 1
\&    lnav
.Ve
.PP
To load all of the files in /var/log:
.PP
.Vb 1
\&    lnav /var/log
.Ve
.PP
To watch the output of make with timestamps prepended:
.PP
.Vb 1
\&    make 2>&1 | lnav \-t
.Ve
.SH AUTHOR
This manual page was written by Salvatore Bonaccorso <carnil@debian.org>
for the Debian system (but may be used by others).