summaryrefslogtreecommitdiffstats
path: root/src/logging_syslog.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-02-18 20:37:04 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-18 20:37:04 +0100
commit2822296ddb22389c5b4e9b8fb6ef7c906ff99314 (patch)
tree5a05ad56e7ac5730bb98d12eef4aa527e4c7d0d9 /src/logging_syslog.c
parent46cfd77f7521ad53934e1e42057723b4cd52d241 (diff)
LOGGING: configure logging from the vty
We can now configure logging to (multiple) files, stderr and syslog from the vty command line in a persistent way (config file)
Diffstat (limited to 'src/logging_syslog.c')
-rw-r--r--src/logging_syslog.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/logging_syslog.c b/src/logging_syslog.c
index b65e8196..b558fc0b 100644
--- a/src/logging_syslog.c
+++ b/src/logging_syslog.c
@@ -21,6 +21,8 @@
#include "../config.h"
+#ifdef HAVE_SYSLOG_H
+
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
@@ -64,9 +66,13 @@ struct log_target *log_target_create_syslog(const char *ident, int option,
if (!target)
return NULL;
+ target->tgt_syslog.facility = facility;
+ target->type = LOG_TGT_TYPE_SYSLOG;
target->output = _syslog_output;
openlog(ident, option, facility);
return target;
}
+
+#endif /* HAVE_SYSLOG_H */