diff options
author | Thomas Klute <thomas2.klute@uni-dortmund.de> | 2013-01-03 16:03:44 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2013-01-08 11:12:10 +0100 |
commit | b78698f75586bf950dd955b1dbfcfe3874927a14 (patch) | |
tree | a4615aaa4c7ba9491e4ad8fec3ce7646817f84d3 | |
parent | 4e51cf895ed7eda2b28f3ae3033e0b96a0cafa41 (diff) | |
download | strongswan-b78698f75586bf950dd955b1dbfcfe3874927a14.tar.bz2 strongswan-b78698f75586bf950dd955b1dbfcfe3874927a14.tar.xz |
conftest: Fix log level settings for stdout
This patch fixes bug #272 ("conftest ignores log settings for stdout").
http://wiki.strongswan.org/issues/272
According to the documentation of add_logger in src/libcharon/bus/bus.h,
the relevant log levels of a logger are registered with the logging
subsystem when adding the logger. If the log levels change later, the
logger must be re-added to propagate the new settings. In conftest.c,
the stdout logger is initialized and added before reading the logging
settings, but wasn't re-added after reading the settings.
-rw-r--r-- | src/conftest/conftest.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conftest/conftest.c b/src/conftest/conftest.c index bb4c5ed97..e8c257d5e 100644 --- a/src/conftest/conftest.c +++ b/src/conftest/conftest.c @@ -386,6 +386,9 @@ static void load_loggers(file_logger_t *logger) char *section; load_log_levels(logger, "stdout"); + /* Re-add the logger to propagate configuration changes to the + * logging system */ + charon->bus->add_logger(charon->bus, &logger->logger); enumerator = conftest->test->create_section_enumerator(conftest->test, "log"); while (enumerator->enumerate(enumerator, §ion)) |