summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-07-28 10:19:42 -0700
committerJustin Pettit <jpettit@nicira.com>2011-08-01 13:23:19 -0700
commitc1a543a8d6d2847983b6b0defd1e19777da85715 (patch)
tree32c38ed3a899a4911e2337a0fe7e2f426bf23a83 /utilities
parent733a287e17bf3764bf31c9528c6b6d30aafdec5f (diff)
downloadopenvswitch-c1a543a8d6d2847983b6b0defd1e19777da85715.tar.gz
vlog: Add a new log level "off".
Until now, "emer" has effectively been "off" because no messages were ever logged at "emer" level. Justin points out that it is useful to use "emer" for messages that indicate a fatal error. This commit makes that change and adds a new "off" level to really turn off all logging to a facility.
Diffstat (limited to 'utilities')
-rw-r--r--utilities/ovs-appctl.8.in3
-rw-r--r--utilities/ovs-appctl.c33
-rwxr-xr-xutilities/ovs-ctl.in2
-rw-r--r--utilities/ovs-vsctl.c2
4 files changed, 21 insertions, 19 deletions
diff --git a/utilities/ovs-appctl.8.in b/utilities/ovs-appctl.8.in
index 04a74dcc2..a3688ac55 100644
--- a/utilities/ovs-appctl.8.in
+++ b/utilities/ovs-appctl.8.in
@@ -70,7 +70,8 @@ set the logging levels for all modules. The \fIfacility\fR may be
system log or to the console, respectively, or \fBANY\fR to set the
logging levels for both facilities. If it is omitted,
\fIfacility\fR defaults to \fBANY\fR. The \fIlevel\fR must be one of
-\fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or \fBdbg\fR, designating the
+\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.
.
diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c
index 88ecfe324..cd059bf1c 100644
--- a/utilities/ovs-appctl.c
+++ b/utilities/ovs-appctl.c
@@ -81,22 +81,23 @@ main(int argc, char *argv[])
static void
usage(void)
{
- printf("%s, for querying and controlling Open vSwitch daemon\n"
- "usage: %s [TARGET] COMMAND [ARG...]\n"
- "Targets:\n"
- " -t, --target=TARGET pidfile or socket to contact\n"
- "Common commands:\n"
- " help List commands supported by the target\n"
- " vlog/list List current logging levels\n"
- " vlog/set MODULE[:FACILITY[:LEVEL]]\n"
- " Set MODULE and FACILITY log level to LEVEL\n"
- " MODULE may be any valid module name or 'ANY'\n"
- " FACILITY may be 'syslog', 'console', 'file', or 'ANY' (default)\n"
- " LEVEL may be 'emer', 'err', 'warn', 'info', or 'dbg' (default)\n"
- " vlog/reopen Make the program reopen its log file\n"
- "Other options:\n"
- " -h, --help Print this helpful information\n"
- " -V, --version Display version information\n",
+ printf("\
+%s, for querying and controlling Open vSwitch daemon\n\
+usage: %s [TARGET] COMMAND [ARG...]\n\
+Targets:\n\
+ -t, --target=TARGET pidfile or socket to contact\n\
+Common commands:\n\
+ help List commands supported by the target\n\
+ vlog/list List current logging levels\n\
+ vlog/set MODULE[:FACILITY[:LEVEL]]\n\
+ Set MODULE and FACILITY log level to LEVEL\n\
+ MODULE may be any valid module name or 'ANY'\n\
+ FACILITY may be 'syslog', 'console', 'file', or 'ANY' (default)\n\
+ LEVEL may be 'off', 'emer', 'err', 'warn', 'info', or 'dbg' (default)\n\
+ vlog/reopen Make the program reopen its log file\n\
+Other options:\n\
+ -h, --help Print this helpful information\n\
+ -V, --version Display version information\n",
program_name, program_name);
exit(EXIT_SUCCESS);
}
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 01741e755..c10241903 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -61,7 +61,7 @@ ovs_vsctl () {
}
ovsdb_tool () {
- ovsdb-tool -vANY:console:emer "$@"
+ ovsdb-tool -vANY:console:off "$@"
}
create_db () {
diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c
index 4f82d0c54..b59d8861c 100644
--- a/utilities/ovs-vsctl.c
+++ b/utilities/ovs-vsctl.c
@@ -444,7 +444,7 @@ vsctl_fatal(const char *format, ...)
message = xvasprintf(format, args);
va_end(args);
- vlog_set_levels(&VLM_vsctl, VLF_CONSOLE, VLL_EMER);
+ vlog_set_levels(&VLM_vsctl, VLF_CONSOLE, VLL_OFF);
VLOG_ERR("%s", message);
ovs_error(0, "%s", message);
vsctl_exit(EXIT_FAILURE);