X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fvlog.c;h=301473cd827462e9d781ede7e15e42a31cbd9c37;hb=5ea61afe521af5ed81cff32726e4cd8d49bf7d50;hp=ef95b1b44e303168b5daac4703fcedacea4100b0;hpb=c1a543a8d6d2847983b6b0defd1e19777da85715;p=openvswitch diff --git a/lib/vlog.c b/lib/vlog.c index ef95b1b4..301473cd 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -346,7 +346,7 @@ vlog_set_levels_from_string(const char *s_) facility = strtok_r(NULL, ":", &save_ptr); - if (!facility || !strcmp(facility, "ANY")) { + if (!facility || !strcasecmp(facility, "ANY")) { e_facility = VLF_ANY_FACILITY; } else { e_facility = vlog_get_facility_val(facility); @@ -357,14 +357,14 @@ vlog_set_levels_from_string(const char *s_) } } - if (!strcmp(module, "PATTERN")) { + if (!strcasecmp(module, "PATTERN")) { vlog_set_pattern(e_facility, save_ptr); break; } else { char *level; enum vlog_level e_level; - if (!strcmp(module, "ANY")) { + if (!strcasecmp(module, "ANY")) { e_module = NULL; } else { e_module = vlog_module_from_name(module); @@ -464,9 +464,11 @@ vlog_init(void) VLOG_ERR("current time is negative: %s (%ld)", s, (long int) now); } - unixctl_command_register("vlog/set", vlog_unixctl_set, NULL); - unixctl_command_register("vlog/list", vlog_unixctl_list, NULL); - unixctl_command_register("vlog/reopen", vlog_unixctl_reopen, NULL); + unixctl_command_register("vlog/set", + "{module[:facility[:level]] | PATTERN:facility:pattern}", + vlog_unixctl_set, NULL); + unixctl_command_register("vlog/list", "", vlog_unixctl_list, NULL); + unixctl_command_register("vlog/reopen", "", vlog_unixctl_reopen, NULL); } /* Closes the logging subsystem. */