2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00
Files
openvswitch/lib/vlog.man
Dave Tucker a5ed8fe32c Python Logging Formatting Improvements
The Open vSwitch daemons written in C support user-configured logging
patterns as described in ovs-appctl(8). This commit adds this capability
to the daemons written in Python.

- Add a '__log_patterns' attribute to the Vlog class
- Populate this using the default patterns in ovs-appctl(8)
- Add a '__start_time' attribute to the Vlog class to support '%r'
- Update the '_log' method to build the log message according to the
  pattern
- Add a 'set_pattern' method to allow the default patterns to be changed
- Update 'set_levels_from_string' to support setting the pattern from a
  string

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-04-28 09:09:04 -07:00

67 lines
2.2 KiB
Groff

.de IQ
. br
. ns
. IP "\\$1"
..
.IP "\fB\-v\fR[\fIspec\fR]
.IQ "\fB\-\-verbose=\fR[\fIspec\fR]
.
Sets logging levels. Without any \fIspec\fR, sets the log level for
every module and facility to \fBdbg\fR. Otherwise, \fIspec\fR is a
list of words separated by spaces or commas or colons, up to one from
each category below:
.
.RS
.IP \(bu
A valid module name, as displayed by the \fBvlog/list\fR command on
\fBovs\-appctl\fR(8), limits the log level change to the specified
module.
.
.IP \(bu
\fBsyslog\fR, \fBconsole\fR, or \fBfile\fR, to limit the log level
change to only to the system log, to the console, or to a file,
respectively.
.IP
On Windows platform, \fBsyslog\fR is accepted as a word and is only
useful along with the \fB\-\-syslog\-target\fR option (the word has no
effect otherwise).
.
.IP \(bu
\fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or
\fBdbg\fR, to control the log level. Messages of the given severity
or higher will be logged, and messages of lower severity will be
filtered out. \fBoff\fR filters out all messages. See
\fBovs\-appctl\fR(8) for a definition of each log level.
.RE
.
.IP
Case is not significant within \fIspec\fR.
.IP
Regardless of the log levels set for \fBfile\fR, logging to a file
will not take place unless \fB\-\-log\-file\fR is also specified (see
below).
.IP
For compatibility with older versions of OVS, \fBany\fR is accepted as
a word but has no effect.
.
.IP "\fB\-v\fR"
.IQ "\fB\-\-verbose\fR"
Sets the maximum logging verbosity level, equivalent to
\fB\-\-verbose=dbg\fR.
.
.IP "\fB\-vPATTERN:\fIfacility\fB:\fIpattern\fR"
.IQ "\fB\-\-verbose=PATTERN:\fIfacility\fB:\fIpattern\fR"
Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Refer to
\fBovs\-appctl\fR(8) for a description of the valid syntax for \fIpattern\fR.
.
.TP
\fB\-\-log\-file\fR[\fB=\fIfile\fR]
Enables logging to a file. If \fIfile\fR is specified, then it is
used as the exact name for the log file. The default log file name
used if \fIfile\fR is omitted is \fB@LOGDIR@/\*(PN.log\fR.
.
.IP "\fB\-\-syslog\-target=\fIhost\fB:\fIport\fR"
Send syslog messages to UDP \fIport\fR on \fIhost\fR, in addition to
the system syslog. The \fIhost\fR must be a numerical IP address, not
a hostname.