summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/logging.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/logging.c b/src/logging.c
index f64fd3c2..eab8bdf8 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -135,6 +135,9 @@ int log_parse_level(const char *lvl)
/*! \brief convert a numeric log level into human-readable string */
const char *log_level_str(unsigned int lvl)
{
+ /* backwards compatibility */
+ if (lvl == 0)
+ return loglevel_strs[0].str;
return get_value_string(loglevel_strs, lvl);
}