diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2017-04-01 16:26:44 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2017-04-01 16:26:44 +0200 |
commit | 05ddd767992d68bb38c7f16ece142e8c2e9ae016 (patch) | |
tree | 302c618be306d4ed3c7f9fc58a1f6aaad4dd252f /src/charon/charon.c | |
parent | 25663e04c3ab01ef8dc9f906608282319cfea2db (diff) | |
download | vyos-strongswan-05ddd767992d68bb38c7f16ece142e8c2e9ae016.tar.gz vyos-strongswan-05ddd767992d68bb38c7f16ece142e8c2e9ae016.zip |
New upstream version 5.5.2
Diffstat (limited to 'src/charon/charon.c')
-rw-r--r-- | src/charon/charon.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/charon/charon.c b/src/charon/charon.c index 116ce7e93..520cb3c74 100644 --- a/src/charon/charon.c +++ b/src/charon/charon.c @@ -59,16 +59,6 @@ static FILE *pidfile = NULL; /** - * Log levels as defined via command line arguments - */ -static level_t levels[DBG_MAX]; - -/** - * Whether to only use syslog when logging - */ -static bool use_syslog = FALSE; - -/** * hook in library for debugging messages */ extern void (*dbg) (debug_t group, level_t level, char *fmt, ...); @@ -126,7 +116,7 @@ static void run() "configuration"); if (lib->settings->load_files(lib->settings, lib->conf, FALSE)) { - charon->load_loggers(charon, levels, !use_syslog); + charon->load_loggers(charon); lib->plugins->reload(lib->plugins, NULL); } else @@ -289,6 +279,8 @@ int main(int argc, char *argv[]) struct sigaction action; int group, status = SS_RC_INITIALIZATION_FAILED; struct utsname utsname; + level_t levels[DBG_MAX]; + bool use_syslog = FALSE; /* logging for library during initialization, as we have no bus yet */ dbg = dbg_stderr; @@ -382,7 +374,8 @@ int main(int argc, char *argv[]) goto deinit; } - charon->load_loggers(charon, levels, !use_syslog); + charon->set_default_loggers(charon, levels, !use_syslog); + charon->load_loggers(charon); if (uname(&utsname) != 0) { |