X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fsyslog.c;h=ee3d9f934681cea63700adf2bdf7a5f2c17feaa8;hp=beb82456b40649c0b15fc0d5327b73787fc6655c;hb=48efd3deb4c9139fd060ff3d289896e9031bcc7c;hpb=3f4d0cbd79ca46e1b98edb10ddee3a723d69a6bb diff --git a/src/syslog.c b/src/syslog.c index beb82456..ee3d9f93 100644 --- a/src/syslog.c +++ b/src/syslog.c @@ -26,8 +26,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #if HAVE_SYSLOG_H #include @@ -41,7 +41,8 @@ static int log_level = LOG_INFO; static int notif_severity; static const char *config_keys[] = { - "LogLevel", "NotifyLevel", + "LogLevel", + "NotifyLevel", }; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); @@ -50,13 +51,14 @@ 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] defaulting to 'info'", value); - return 1; + WARNING("syslog: invalid loglevel [%s] defaulting to 'info'", value); } } else if (strcasecmp(key, "NotifyLevel") == 0) { notif_severity = parse_notif_severity(value); - if (notif_severity < 0) + if (notif_severity < 0) { + ERROR("syslog: invalid notification severity [%s]", value); return 1; + } } return 0;