vlog: abstract out interface to syslog daemon
[cascardo/ovs.git] / lib / vlog.man
1 .de IQ
2 .  br
3 .  ns
4 .  IP "\\$1"
5 ..
6 .IP "\fB\-v\fR[\fIspec\fR]
7 .IQ "\fB\-\-verbose=\fR[\fIspec\fR]
8 .
9 Sets logging levels.  Without any \fIspec\fR, sets the log level for
10 every module and destination to \fBdbg\fR.  Otherwise, \fIspec\fR is a
11 list of words separated by spaces or commas or colons, up to one from
12 each category below:
13 .
14 .RS
15 .IP \(bu
16 A valid module name, as displayed by the \fBvlog/list\fR command on
17 \fBovs\-appctl\fR(8), limits the log level change to the specified
18 module.
19 .
20 .IP \(bu
21 \fBsyslog\fR, \fBconsole\fR, or \fBfile\fR, to limit the log level
22 change to only to the system log, to the console, or to a file,
23 respectively.
24 .IP
25 On Windows platform, \fBsyslog\fR is accepted as a word and is only
26 useful along with the \fB\-\-syslog\-target\fR option (the word has no
27 effect otherwise).
28 .
29 .IP \(bu
30 \fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or
31 \fBdbg\fR, to control the log level.  Messages of the given severity
32 or higher will be logged, and messages of lower severity will be
33 filtered out.  \fBoff\fR filters out all messages.  See
34 \fBovs\-appctl\fR(8) for a definition of each log level.
35 .RE
36 .
37 .IP
38 Case is not significant within \fIspec\fR.
39 .IP
40 Regardless of the log levels set for \fBfile\fR, logging to a file
41 will not take place unless \fB\-\-log\-file\fR is also specified (see
42 below).
43 .IP
44 For compatibility with older versions of OVS, \fBany\fR is accepted as
45 a word but has no effect.
46 .
47 .IP "\fB\-v\fR"
48 .IQ "\fB\-\-verbose\fR"
49 Sets the maximum logging verbosity level, equivalent to
50 \fB\-\-verbose=dbg\fR.
51 .
52 .IP "\fB\-vPATTERN:\fIdestination\fB:\fIpattern\fR"
53 .IQ "\fB\-\-verbose=PATTERN:\fIdestination\fB:\fIpattern\fR"
54 Sets the log pattern for \fIdestination\fR to \fIpattern\fR.  Refer to
55 \fBovs\-appctl\fR(8) for a description of the valid syntax for \fIpattern\fR.
56 .
57 .IP "\fB\-vFACILITY:\fIfacility\fR"
58 .IQ "\fB\-\-verbose=FACILITY:\fIfacility\fR"
59 Sets the RFC5424 facility of the log message. \fIfacility\fR can be one of
60 \fBkern\fR, \fBuser\fR, \fBmail\fR, \fBdaemon\fR, \fBauth\fR, \fBsyslog\fR,
61 \fBlpr\fR, \fBnews\fR, \fBuucp\fR, \fBclock\fR, \fBftp\fR, \fBntp\fR,
62 \fBaudit\fR, \fBalert\fR, \fBclock2\fR, \fBlocal0\fR, \fBlocal1\fR,
63 \fBlocal2\fR, \fBlocal3\fR, \fBlocal4\fR, \fBlocal5\fR, \fBlocal6\fR or
64 \fBlocal7\fR. If this option is not specified, \fBdaemon\fR is used as
65 the default for the local system syslog and \fBlocal0\fR is used while sending
66 a message to the target provided via the \fB\-\-syslog\-target\fR option.
67 .
68 .TP
69 \fB\-\-log\-file\fR[\fB=\fIfile\fR]
70 Enables logging to a file.  If \fIfile\fR is specified, then it is
71 used as the exact name for the log file.  The default log file name
72 used if \fIfile\fR is omitted is \fB@LOGDIR@/\*(PN.log\fR.
73 .
74 .IP "\fB\-\-syslog\-target=\fIhost\fB:\fIport\fR"
75 Send syslog messages to UDP \fIport\fR on \fIhost\fR, in addition to
76 the system syslog.  The \fIhost\fR must be a numerical IP address, not
77 a hostname.
78 .
79 .IP "\fB\-\-syslog\-method=\fImethod\fR"
80 Specify \fImethod\fR how syslog messages should be sent to syslog daemon.
81 Following forms are supported:
82 .RS
83 .IP \(bu
84 \fBlibc\fR, use libc \fBsyslog()\fR function.  This is the default behavior.
85 Downside of using this options is that libc adds fixed prefix to every
86 message before it is actually sent to the syslog daemon over \fB/dev/log\fR
87 UNIX domain socket.
88 .IP \(bu
89 \fBunix:\fIfile\fR\fR, use UNIX domain socket directly.  It is possible to
90 specify arbitrary message format with this option.  However,
91 \fBrsyslogd 8.9\fR and older versions use hard coded parser function anyway
92 that limits UNIX domain socket use.  If you want to use arbitrary message
93 format with older \fBrsyslogd\fR versions, then use UDP socket to localhost
94 IP address instead.
95 .IP \(bu
96 \fBudp:\fIip\fR:\fIport\fR\fR, use UDP socket.  With this method it is
97 possible to use arbitrary message format also with older \fBrsyslogd\fR.
98 When sending syslog messages over UDP socket extra precaution needs to
99 be taken into account, for example, syslog daemon needs to be configured
100 to listen on the specified UDP port, accidental iptables rules could be
101 interfering with local syslog traffic and there are some security
102 considerations that apply to UDP sockets, but do not apply to UNIX domain
103 sockets.
104 .RE