fix format error in show logging config output
Change-Id: Idc41a219db185b524f497b096eb71892b5f9ebf8
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
diff --git a/src/vlib/log.c b/src/vlib/log.c
index 9ab7e08..76490fc 100644
--- a/src/vlib/log.c
+++ b/src/vlib/log.c
@@ -353,18 +353,21 @@
vlib_cli_output (vm, "%-22s %-14s %-14s %s",
"Class/Subclass", "Level", "Syslog Level", "Rate Limit");
+
+ u8 *defstr = format (0, "default");
vec_foreach (c, lm->classes)
{
- vlib_cli_output (vm, "%s", c->name);
+ vlib_cli_output (vm, "%v", c->name);
vec_foreach (sc, c->subclasses)
{
- vlib_cli_output (vm, " %-20s %-14U %-14U %d",
- sc->name ? (char *) sc->name : "default",
+ vlib_cli_output (vm, " %-20v %-14U %-14U %d",
+ sc->name ? sc->name : defstr,
format_vlib_log_level, sc->level,
format_vlib_log_level, sc->syslog_level,
sc->rate_limit);
}
}
+ vec_free (defstr);
return error;
}