diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-27 15:32:51 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-27 15:32:51 +0100 |
commit | a6428d2376034d619f342897d3ce415b3f9a3584 (patch) | |
tree | 9eff395489747aa5a35b5310e3bdacf5afc448da /src | |
parent | 3309a43ef56366926589fdb3f7e4ee8af41fe1c5 (diff) |
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".
Diffstat (limited to 'src')
-rw-r--r-- | src/logging.c | 3 |
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); } |