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.5.0~300^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=84c380561c5b378448987bfde8df26e07bac6d8a;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) {