From: Tomek Mrugalski Date: Fri, 8 Aug 2014 10:57:52 +0000 (+0200) Subject: [3427] Logging configuration now properly processes more than one logger X-Git-Tag: trac3482_base~54^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75a12c69c268aeaaef1ccb1de735ecd1c28fbd5b;p=thirdparty%2Fkea.git [3427] Logging configuration now properly processes more than one logger --- diff --git a/src/lib/dhcpsrv/logging.cc b/src/lib/dhcpsrv/logging.cc index 3ac92ec507..27ec41dfc3 100644 --- a/src/lib/dhcpsrv/logging.cc +++ b/src/lib/dhcpsrv/logging.cc @@ -156,6 +156,8 @@ void LogConfigParser::applyConfiguration() { // Set locking directory to /tmp setenv("B10_LOCKFILE_DIR_FROM_BUILD", "/tmp", 1); + std::vector specs; + // Now iterate through all specified loggers for (LoggingInfoStorage::const_iterator it = config_->logging_info_.begin(); it != config_->logging_info_.end(); ++it) { @@ -206,9 +208,11 @@ void LogConfigParser::applyConfiguration() { spec.addOutputOption(option); } - LoggerManager manager; - manager.process(spec); + specs.push_back(spec); } + + LoggerManager manager; + manager.process(specs.begin(), specs.end()); } void LogConfigParser::applyDefaultConfiguration(bool verbose) {