summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vty/logging_vty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index a23c1a74..d2fca819 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -275,6 +275,9 @@ static void vty_print_logtarget(struct vty *vty, const struct log_info *info,
for (i = 0; i < info->num_cat; i++) {
const struct log_category *cat = &tgt->categories[i];
+ /* Skip categories that were not initialized */
+ if (!info->cat[i].name)
+ continue;
vty_out(vty, " %-10s %-10s %-8s %s%s",
info->cat[i].name+1, log_level_str(cat->loglevel),
cat->enabled ? "Enabled" : "Disabled",