summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c1af1b)
raw | patch | inline | side by side (parent: 5c1af1b)
author | Florian Forster <octo@collectd.org> | |
Sat, 25 Feb 2012 16:33:05 +0000 (17:33 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 25 Feb 2012 16:33:05 +0000 (17:33 +0100) |
It's a noteworthy event that implies normal operation, i.e. NOTICE. Also
renamed "severity" to "log_severity" to emphasize its use.
Change-Id: I7f3e4b12dabeb0caa9c9c8c86924bf77b2627ba1
renamed "severity" to "log_severity" to emphasize its use.
Change-Id: I7f3e4b12dabeb0caa9c9c8c86924bf77b2627ba1
src/syslog.c | patch | blob | history |
diff --git a/src/syslog.c b/src/syslog.c
index fd313dd710b0aa04e58aee4cea041d216132460f..a315351720ce61e8c05828387195f9edae2075d5 100644 (file)
--- a/src/syslog.c
+++ b/src/syslog.c
char *buf_ptr = buf;
int buf_len = sizeof (buf);
int status;
- int severity;
+ int log_severity;
if (n->severity > notif_severity)
return (0);
APPEND (buf_ptr, buf_len, "type_instance", n->type_instance);
APPEND (buf_ptr, buf_len, "message", n->message);
+#undef APPEND
+
buf[sizeof (buf) - 1] = '\0';
switch (n->severity)
{
case NOTIF_FAILURE:
- severity = LOG_ERR;
+ log_severity = LOG_ERR;
break;
case NOTIF_WARNING:
- severity = LOG_WARNING;
+ log_severity = LOG_WARNING;
break;
case NOTIF_OKAY:
- severity = LOG_WARNING;
+ log_severity = LOG_NOTICE;
break;
- default: severity = LOG_INFO;
+ default:
+ log_severity = LOG_ERR;
}
- sl_log (severity, buf, NULL);
+ sl_log (log_severity, buf, NULL);
return (0);
} /* int sl_notification */