BIND 10 trac2445, updated. 27442da4487da8da452967438bb8c784d0ac05c5 [2445] Revert "Remove setLogLevel(TRACE) in createBufferAppender"

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Dec 11 09:56:28 UTC 2012


The branch, trac2445 has been updated
       via  27442da4487da8da452967438bb8c784d0ac05c5 (commit)
      from  3f9c7bb8a987dc1b4e2a9266ac95cf231d8fe621 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 27442da4487da8da452967438bb8c784d0ac05c5
Author: Jelte Jansen <jelte at isc.org>
Date:   Tue Dec 11 10:55:59 2012 +0100

    [2445] Revert "Remove setLogLevel(TRACE) in createBufferAppender"
    
    This reverts commit 3f9c7bb8a987dc1b4e2a9266ac95cf231d8fe621.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/log/logger_manager_impl.cc      |    3 +++
 src/lib/log/tests/buffer_logger_test.cc |   10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/log/logger_manager_impl.cc b/src/lib/log/logger_manager_impl.cc
index 3d12571..6862d0c 100644
--- a/src/lib/log/logger_manager_impl.cc
+++ b/src/lib/log/logger_manager_impl.cc
@@ -145,6 +145,9 @@ LoggerManagerImpl::createBufferAppender(log4cplus::Logger& logger) {
     log4cplus::SharedAppenderPtr bufferapp(new internal::BufferAppender());
     bufferapp->setName("buffer");
     logger.addAppender(bufferapp);
+    // Since we do not know at what level the loggers will end up
+    // running, set it to the highest for now
+    logger.setLogLevel(log4cplus::TRACE_LOG_LEVEL);
 }
 
 // Syslog appender.
diff --git a/src/lib/log/tests/buffer_logger_test.cc b/src/lib/log/tests/buffer_logger_test.cc
index 84fb797..8d1b3cf 100644
--- a/src/lib/log/tests/buffer_logger_test.cc
+++ b/src/lib/log/tests/buffer_logger_test.cc
@@ -22,7 +22,7 @@ using namespace isc::log;
 
 namespace {
 void usage() {
-    std::cout << "Usage: buffer_logger_test [-nv]" << std::endl;
+    std::cout << "Usage: buffer_logger_test [-n]" << std::endl;
 }
 } // end unnamed namespace
 
@@ -52,10 +52,10 @@ main(int argc, char** argv) {
         }
     }
 
-    // Note, level is set to DEBUG here, but back to INFO
-    // in process(), so when flushing to stdout (-n), the DEBUG
-    // message should show up
-    initLogger("buffertest", isc::log::DEBUG, 99, NULL, true);
+    // Note, level is INFO, so DEBUG should normally not show
+    // up. Unless process is never called (at which point it
+    // will end up in the dump at the end).
+    initLogger("buffertest", isc::log::INFO, 0, NULL, true);
     Logger logger("log");
     // No need for file interprocess locking in this test
     logger.setInterprocessSync(new isc::util::InterprocessSyncNull("logger"));



More information about the bind10-changes mailing list