BIND 10 trac2445, updated. 3f9c7bb8a987dc1b4e2a9266ac95cf231d8fe621 [2445] Remove setLogLevel(TRACE) in createBufferAppender
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Dec 10 23:38:00 UTC 2012
The branch, trac2445 has been updated
via 3f9c7bb8a987dc1b4e2a9266ac95cf231d8fe621 (commit)
from 0a9dafbece0545af535494a7e5745a14c87ed9f5 (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 3f9c7bb8a987dc1b4e2a9266ac95cf231d8fe621
Author: Jelte Jansen <jelte at isc.org>
Date: Tue Dec 11 00:37:04 2012 +0100
[2445] Remove setLogLevel(TRACE) in createBufferAppender
This has a chance that some log messages get lost (DEBUG messages during startup in case -v is not given but the config has DEBUG set)
-----------------------------------------------------------------------
Summary of changes:
src/lib/log/logger_manager_impl.cc | 3 ---
src/lib/log/tests/buffer_logger_test.cc | 10 +++++-----
2 files changed, 5 insertions(+), 8 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/log/logger_manager_impl.cc b/src/lib/log/logger_manager_impl.cc
index 6862d0c..3d12571 100644
--- a/src/lib/log/logger_manager_impl.cc
+++ b/src/lib/log/logger_manager_impl.cc
@@ -145,9 +145,6 @@ 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 8d1b3cf..84fb797 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 [-n]" << std::endl;
+ std::cout << "Usage: buffer_logger_test [-nv]" << std::endl;
}
} // end unnamed namespace
@@ -52,10 +52,10 @@ main(int argc, char** argv) {
}
}
- // 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);
+ // 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);
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