X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsyslog.c;h=b4e2c0cfc159916c315bd6239f4bb437c9bc11de;hb=3542cbfc6ef7cfd4b73ba13397fee38b2eb295f5;hp=90a97fb52fff8a27598332f60ac3a2525e945086;hpb=3a9c4019736178fb78e65389acaf97c84cdc3086;p=collectd.git diff --git a/src/syslog.c b/src/syslog.c index 90a97fb5..b4e2c0cf 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 @@ -38,10 +38,11 @@ static int log_level = LOG_DEBUG; #else static int log_level = LOG_INFO; #endif /* COLLECT_DEBUG */ -static int notif_severity = 0; +static int notif_severity; static const char *config_keys[] = { - "LogLevel", "NotifyLevel", + "LogLevel", + "NotifyLevel", }; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); @@ -55,8 +56,10 @@ static int sl_config(const char *key, const char *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;