From a6428d2376034d619f342897d3ce415b3f9a3584 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 27 Feb 2013 15:32:51 +0100 Subject: Follow up fix for the log level "everything" Commit cd6ed82d1ff48f47ad9e33e6322df62896a76ed5 made "EVERYTHING" map to LOGL_DEBUG but when writing out the configuration the following would be written: logging level all unknown 0x0 This happend because no string was found for the value 0. Address it by adding a legacy check for 0 and write out the str from the index 0. Currently this is "EVERYTHING". --- src/logging.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- cgit v1.2.3