Skip to content

Commit

Permalink
vlog: Make "vlog/set" without args set everything to "dbg".
Browse files Browse the repository at this point in the history
The documentation stated that "ovs-appctl vlog/set" without any
arguments should set every module and destination to debug level.

Signed-off-by: Justin Pettit <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
justinpettit committed Jul 15, 2017
1 parent b2f4b62 commit f446e7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/vlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,10 @@ vlog_unixctl_set(struct unixctl_conn *conn, int argc, const char *argv[],
{
int i;

/* With no argument, set all destinations and modules to "dbg". */
if (argc == 1) {
vlog_set_levels(NULL, VLF_ANY_DESTINATION, VLL_DBG);
}
for (i = 1; i < argc; i++) {
char *msg = vlog_set_levels_from_string(argv[i]);
if (msg) {
Expand Down Expand Up @@ -791,7 +795,7 @@ vlog_init(void)

unixctl_command_register(
"vlog/set", "{spec | PATTERN:destination:pattern}",
1, INT_MAX, vlog_unixctl_set, NULL);
0, INT_MAX, vlog_unixctl_set, NULL);
unixctl_command_register("vlog/list", "", 0, 0, vlog_unixctl_list,
NULL);
unixctl_command_register("vlog/list-pattern", "", 0, 0,
Expand Down

0 comments on commit f446e7c

Please sign in to comment.