]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3427] Logging configuration now properly processes more than one logger
authorTomek Mrugalski <tomasz@isc.org>
Fri, 8 Aug 2014 10:57:52 +0000 (12:57 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 8 Aug 2014 10:57:52 +0000 (12:57 +0200)
src/lib/dhcpsrv/logging.cc

index 3ac92ec5070505ef8c083855e7a59100bbe18977..27ec41dfc35d834c7ba02d5c83284608e2dd1322 100644 (file)
@@ -156,6 +156,8 @@ void LogConfigParser::applyConfiguration() {
     // Set locking directory to /tmp
     setenv("B10_LOCKFILE_DIR_FROM_BUILD", "/tmp", 1);
 
+    std::vector<LoggerSpecification> 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) {