From: Wilfried Goesgens Date: Sat, 7 Jun 2014 10:01:32 +0000 (+0200) Subject: Syslog: if we can't find the loglevel specified by the configuration string default... X-Git-Tag: collectd-5.3.2~30 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=84e796d11f9c588c0ce7fee5a2035bf3d4aca596;p=collectd.git Syslog: if we can't find the loglevel specified by the configuration string default to 'info' and warn about the unknown configuration option. no way to make syslog totaly silent anymore. --- diff --git a/src/syslog.c b/src/syslog.c index 4f5d0c4a..1a70fd00 100644 --- a/src/syslog.c +++ b/src/syslog.c @@ -48,7 +48,11 @@ static int sl_config (const char *key, const char *value) { log_level = parse_log_severity (value); if (log_level < 0) + { + log_level = LOG_INFO; + ERROR ("syslog: invalid loglevel [%s] defauling to 'info'", value); return (1); + } } else if (strcasecmp (key, "NotifyLevel") == 0) {