]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2445] Don't replace appenders in processSpecification()
authorJelte Jansen <jelte@isc.org>
Wed, 5 Dec 2012 15:00:23 +0000 (16:00 +0100)
committerJelte Jansen <jelte@isc.org>
Wed, 5 Dec 2012 15:00:23 +0000 (16:00 +0100)
slightly changed outer layer process() call so it isn't necessary anymore

src/lib/log/logger_manager.h
src/lib/log/logger_manager_impl.cc

index 18fc402bd03273ca6fd4d40c02a13082884bb1b2..6320e0486dcb5b115ba3a6b663f9562218684c7d 100644 (file)
@@ -93,7 +93,7 @@ public:
     void process() {
         // empty iterator; set defaults
         const LoggerSpecification spec;
-        processSpecification(spec);
+        process(spec);
     }
 
     /// \brief Run-Time Initialization
index 7811afeb04627ab43c2c28f39adc7f101845b324..1605b6ff44b12be74ed55a49e3839330eb7767b6 100644 (file)
@@ -70,11 +70,10 @@ LoggerManagerImpl::processSpecification(const LoggerSpecification& spec) {
     // Set the additive flag.
     logger.setAdditivity(spec.getAdditive());
 
-    // Replace all appenders for this logger.
-    logger.removeAllAppenders();
-
     // Output options given?
     if (spec.optionCount() > 0) {
+        // Replace all appenders for this logger.
+        logger.removeAllAppenders();
 
         // Now process output specifications.
         for (LoggerSpecification::const_iterator i = spec.begin();
@@ -102,10 +101,6 @@ LoggerManagerImpl::processSpecification(const LoggerSpecification& spec) {
                           i->destination);
             }
         }
-    } else {
-        // If no output options are given, use a default appender
-        OutputOption opt;
-        createConsoleAppender(logger, opt);
     }
     // Should anything be left in the buffer, this is the time to flush it.
     getLogBuffer().flush();