1. Otherwise, the log classes with same prefix, e.g. "abc" and
"abc-de" will all be registered into log class "abc";
2. Minor improvement for test log help string.
Change-Id: I8d93be5e8fa67db6012198b3442a9e2bddcb744a
Signed-off-by: Su Wang <su.z.wang@ericsson.com>
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;
/* *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* */