projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Auto-Merge pull request #3206 from dago/pid_test
[collectd.git]
/
src
/
syslog.c
diff --git
a/src/syslog.c
b/src/syslog.c
index
90a97fb
..
b4e2c0c
100644
(file)
--- a/
src/syslog.c
+++ b/
src/syslog.c
@@
-26,8
+26,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
+#include "utils/common/common.h"
#if HAVE_SYSLOG_H
#include <syslog.h>
#if HAVE_SYSLOG_H
#include <syslog.h>
@@
-38,10
+38,11
@@
static int log_level = LOG_DEBUG;
#else
static int log_level = LOG_INFO;
#endif /* COLLECT_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[] = {
static const char *config_keys[] = {
- "LogLevel", "NotifyLevel",
+ "LogLevel",
+ "NotifyLevel",
};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
};
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);
}
} 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 1;
+ }
}
return 0;
}
return 0;