diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
commit | 7585facf05d927eb6df3929ce09ed5e60d905437 (patch) | |
tree | e4d14b4dc180db20356b6b01ce0112f3a2d7897e /src/charon-nm/charon-nm.c | |
parent | c1343b3278cdf99533b7902744d15969f9d6fdc1 (diff) | |
download | vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.tar.gz vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.zip |
Imported Upstream version 5.0.2
Diffstat (limited to 'src/charon-nm/charon-nm.c')
-rw-r--r-- | src/charon-nm/charon-nm.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/charon-nm/charon-nm.c b/src/charon-nm/charon-nm.c index 35e906778..61f2937ce 100644 --- a/src/charon-nm/charon-nm.c +++ b/src/charon-nm/charon-nm.c @@ -117,28 +117,6 @@ static void segv_handler(int signal) } /** - * Initialize logging to syslog - */ -static void initialize_logger() -{ - sys_logger_t *sys_logger; - debug_t group; - level_t def; - - sys_logger = sys_logger_create(LOG_DAEMON, FALSE); - def = lib->settings->get_int(lib->settings, - "charon-nm.syslog.default", 1); - for (group = 0; group < DBG_MAX; group++) - { - sys_logger->set_level(sys_logger, group, - lib->settings->get_int(lib->settings, "charon-nm.syslog.%N", def, - debug_lower_names, group)); - } - charon->sys_loggers->insert_last(charon->sys_loggers, sys_logger); - charon->bus->add_logger(charon->bus, &sys_logger->logger); -} - -/** * Lookup UID and GID */ static bool lookup_uid_gid() @@ -204,7 +182,11 @@ int main(int argc, char *argv[]) goto deinit; } - initialize_logger(); + /* make sure we log to the DAEMON facility by default */ + lib->settings->set_int(lib->settings, "charon-nm.syslog.daemon.default", + lib->settings->get_int(lib->settings, + "charon-nm.syslog.daemon.default", 1)); + charon->load_loggers(charon, NULL, FALSE); /* use random ports to avoid conflicts with regular charon */ lib->settings->set_int(lib->settings, "charon-nm.port", 0); |