summaryrefslogtreecommitdiffstats
path: root/lib/log.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-18 15:13:37 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-08-14 22:02:05 +0200
commit472878dc0fdd5e17500e8a6ba8a65d13e36d9467 (patch)
treee92ddabd91c15d6b465e577d09216c3207ed907e /lib/log.c
parentlib: Add LIB_ERR_NS to error subsystem (diff)
downloadfrr-472878dc0fdd5e17500e8a6ba8a65d13e36d9467.tar.xz
frr-472878dc0fdd5e17500e8a6ba8a65d13e36d9467.zip
lib: Add LIB_ERR_DEVELOPMENT
Sometimes a error state is detected when we have added new code to FRR, but not updated all the places that we should have. Consider this a developmental escape that needs to be fixed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/log.c')
-rw-r--r--lib/log.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/log.c b/lib/log.c
index afecbef19..6aa718c95 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -987,7 +987,8 @@ static const struct zebra_desc_table *zroute_lookup(unsigned int zroute)
unsigned int i;
if (zroute >= array_size(route_types)) {
- zlog_err("unknown zebra route type: %u", zroute);
+ zlog_ferr(LIB_ERR_DEVELOPMENT, "unknown zebra route type: %u",
+ zroute);
return &unknown;
}
if (zroute == route_types[zroute].type)
@@ -1001,7 +1002,9 @@ static const struct zebra_desc_table *zroute_lookup(unsigned int zroute)
return &route_types[i];
}
}
- zlog_err("internal error: cannot find route type %u in table!", zroute);
+ zlog_ferr(LIB_ERR_DEVELOPMENT,
+ "internal error: cannot find route type %u in table!",
+ zroute);
return &unknown;
}
@@ -1018,7 +1021,8 @@ char zebra_route_char(unsigned int zroute)
const char *zserv_command_string(unsigned int command)
{
if (command >= array_size(command_types)) {
- zlog_err("unknown zserv command type: %u", command);
+ zlog_ferr(LIB_ERR_DEVELOPMENT, "unknown zserv command type: %u",
+ command);
return unknown.string;
}
return command_types[command].string;