summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vlib/log.c b/src/vlib/log.c
index 76490fcd3bc..9a0d75fe3ac 100644
--- a/src/vlib/log.c
+++ b/src/vlib/log.c
@@ -232,6 +232,8 @@ vlib_log_register_class (char *class, char *subclass)
vlib_log_class_data_t *tmp;
vec_foreach (tmp, lm->classes)
{
+ if (vec_len (tmp->name) != strlen (class))
+ continue;
if (!memcmp (class, tmp->name, vec_len (tmp->name)))
{
c = tmp;
@@ -689,7 +691,7 @@ test_log_class_subclass (vlib_main_t * vm,
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cli_test_log, static) = {
.path = "test log",
- .short_help = "test log <class> <subclass> <level> <message",
+ .short_help = "test log <level> <class> <subclass> <message>",
.function = test_log_class_subclass,
};
/* *INDENT-ON* */