From c888188e5aabb3600d30ef48202b6f1c53349024 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 25 Feb 2012 17:25:50 +0100 Subject: [PATCH] syslog plugin: Parse "value" as severity, not "key". Change-Id: I4a7bde018be5a8925c9a998cd3e89e0289453063 --- src/syslog.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/syslog.c b/src/syslog.c index fc34e56c..d584eec9 100644 --- a/src/syslog.c +++ b/src/syslog.c @@ -33,7 +33,7 @@ static int log_level = LOG_DEBUG; #else static int log_level = LOG_INFO; #endif /* COLLECT_DEBUG */ -static int notif_severity = -1; +static int notif_severity = 0; static const char *config_keys[] = { @@ -47,11 +47,14 @@ static int sl_config (const char *key, const char *value) if (strcasecmp (key, "LogLevel") == 0) { log_level = parse_log_severity (value); - if (log_level == -1) return (1); + if (log_level < 0) + return (1); } else if (strcasecmp (key, "NotifyLevel") == 0) { - notif_severity = parse_notif_severity(key); + notif_severity = parse_notif_severity (value); + if (notif_severity < 0) + return (1); } return (0); -- 2.30.2