diff options
author | Jerome Tollet <jtollet@cisco.com> | 2018-10-02 22:54:30 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-03 14:06:14 +0000 |
commit | e4db80344a8448930a71f5b1200757e7c6c9072b (patch) | |
tree | 4db06d22c5fe551c84953892c86f7552d7e39621 /src/vlib/log.c | |
parent | 76e2cccf18d9acf119c34968c6be52cc3afb0f84 (diff) |
fix format error in show logging config output
Change-Id: Idc41a219db185b524f497b096eb71892b5f9ebf8
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
Diffstat (limited to 'src/vlib/log.c')
-rw-r--r-- | src/vlib/log.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vlib/log.c b/src/vlib/log.c index 9ab7e08f7b9..76490fcd3bc 100644 --- a/src/vlib/log.c +++ b/src/vlib/log.c @@ -353,18 +353,21 @@ show_log_config (vlib_main_t * vm, 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; } |