daemon: Use separate method to set default loggers
This way it is not necessary to pass the same values to reload the loggers.
This commit is contained in:
@@ -41,11 +41,6 @@ void dispatcher_cleanup()
|
||||
DESTROY_IF(dispatcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loglevel configuration
|
||||
*/
|
||||
static level_t levels[DBG_MAX];
|
||||
|
||||
/**
|
||||
* hook in library for debugging messages
|
||||
*/
|
||||
@@ -154,6 +149,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
struct sigaction action;
|
||||
struct utsname utsname;
|
||||
level_t levels[DBG_MAX];
|
||||
int group;
|
||||
|
||||
dbg = dbg_stderr;
|
||||
@@ -178,7 +174,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
levels[group] = LEVEL_CTRL;
|
||||
}
|
||||
charon->load_loggers(charon, levels, TRUE);
|
||||
charon->set_default_loggers(charon, levels, TRUE);
|
||||
charon->load_loggers(charon);
|
||||
|
||||
lib->settings->set_default_str(lib->settings, "charon-xpc.port", "0");
|
||||
lib->settings->set_default_str(lib->settings, "charon-xpc.port_nat_t", "0");
|
||||
|
||||
Reference in New Issue
Block a user