vlog: Move log level definitions from source code to user documentation.
authorBen Pfaff <blp@nicira.com>
Thu, 28 Jul 2011 17:19:43 +0000 (10:19 -0700)
committerJustin Pettit <jpettit@nicira.com>
Mon, 1 Aug 2011 20:25:23 +0000 (13:25 -0700)
Users should be able to find out what a log level means without reading
source code comments, so this seems like a better place for it.

Reported-by: David Tsai <dtsai@nicira.com>
lib/vlog.h
lib/vlog.man
utilities/ovs-appctl.8.in

index aa98c06..6fa007b 100644 (file)
@@ -30,26 +30,7 @@ extern "C" {
 
 /* Logging severity levels.
  *
- * A logging severity level of OFF suppresses logging.  Messages at the
- * following log levels, in descending order of importance, are enabled by
- * default:
- *
- *   - EMER: The process is aborting due to unrecoverable failure.
- *
- *   - ERR: A high-level operation or a subsystem failed.  Attention is
- *     warranted.
- *
- *   - WARN: A low-level operation failed, but higher-level subsystems may be
- *     able to recover.
- *
- *   - INFO: Information that may be useful in retrospect when investigating
- *     a problem.
- *
- * The lowest log level is not enabled by default:
- *
- *   - DBG: Information useful only to someone with intricate knowledge of the
- *     system, or that would commonly cause too-voluminous log output.
- */
+ * ovs-appctl(8) defines each of the log levels. */
 #define VLOG_LEVELS                             \
     VLOG_LEVEL(OFF, LOG_ALERT)                  \
     VLOG_LEVEL(EMER, LOG_ALERT)                 \
index 63e712e..0fff860 100644 (file)
@@ -24,7 +24,8 @@ below).
 \fIlevel\fR must be one of \fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR,
 \fBinfo\fR, or
 \fBdbg\fR, designating the minimum severity of a message for it to be
-logged.  If it is omitted, \fIlevel\fR defaults to \fBdbg\fR.
+logged.  If it is omitted, \fIlevel\fR defaults to \fBdbg\fR.  See
+\fBovs\-appctl\fR(8) for a definition of each log level.
 .RE
 .
 .TP
index a3688ac..5108598 100644 (file)
@@ -55,9 +55,38 @@ as if it had been specified directly as the target.
 The default target is \fBovs\-vswitchd\fR.
 .
 .SH LOGGING COMMANDS
+.
+.PP
+Open vSwitch has several log levels.  The highest-severity log level
+is:
+.
+.IP "\fBOFF\fR"
+No message is ever logged at this level, so setting a logging
+facility's log level to \fBOFF\fR disables logging to that facility.
+.
+.PP
+The following log levels, in order of descending severity, are enabled
+by default:
+.
+.IP "\fBEMER\f"
+A major failure forced a process to abort.
+.IP "\fBERR\fR"
+A high-level operation or a subsystem failed.  Attention is
+warranted.
+.IP "\fBWARN\fR"
+A low-level operation failed, but higher-level subsystems may be able
+to recover.
+.IP "\fBINFO\fR"
+Information that may be useful in retrospect when investigating
+a problem.
+.IP "\fBDBG\fR"
+Information useful only to someone with intricate knowledge of the
+system, or that would commonly cause too-voluminous log output.  Log
+messages at this level are not logged by default.
+.
+.PP
 Every Open vSwitch daemon supports the following commands for
 examining and adjusting log levels.
-.
 .IP "\fBvlog/list\fR"
 Lists the known logging modules and their current levels.
 .