projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
contrib/php-collection: Add a PHP frontend for graph generation.
[collectd.git]
/
src
/
syslog.c
diff --git
a/src/syslog.c
b/src/syslog.c
index
08dadcb
..
a21bef1
100644
(file)
--- a/
src/syslog.c
+++ b/
src/syslog.c
@@
-28,7
+28,11
@@
# include <syslog.h>
#endif
# include <syslog.h>
#endif
+#if COLLECT_DEBUG
static int log_level = LOG_DEBUG;
static int log_level = LOG_DEBUG;
+#else
+static int log_level = LOG_INFO;
+#endif /* COLLECT_DEBUG */
static const char *config_keys[] =
{
static const char *config_keys[] =
{
@@
-64,13
+68,6
@@
static int sl_config (const char *key, const char *value)
return (0);
} /* int sl_config */
return (0);
} /* int sl_config */
-static int sl_init (void)
-{
- openlog ("collectd", LOG_CONS | LOG_PID, LOG_DAEMON);
-
- return (0);
-}
-
static void sl_log (int severity, const char *msg)
{
if (severity > log_level)
static void sl_log (int severity, const char *msg)
{
if (severity > log_level)
@@
-88,8
+85,9
@@
static int sl_shutdown (void)
void module_register (void)
{
void module_register (void)
{
+ openlog ("collectd", LOG_CONS | LOG_PID, LOG_DAEMON);
+
plugin_register_config ("syslog", sl_config, config_keys, config_keys_num);
plugin_register_config ("syslog", sl_config, config_keys, config_keys_num);
- plugin_register_init ("syslog", sl_init);
plugin_register_log ("syslog", sl_log);
plugin_register_shutdown ("syslog", sl_shutdown);
} /* void module_register(void) */
plugin_register_log ("syslog", sl_log);
plugin_register_shutdown ("syslog", sl_shutdown);
} /* void module_register(void) */