From: Jelte Jansen Date: Thu, 20 Dec 2012 14:28:22 +0000 (+0100) Subject: [1081] Disable log4cplus internal logging X-Git-Tag: bind10-1.0.0-rc-release~95^2~21^2~8^2~12^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb95fe7735c5995f727ea42dfafcad820a3764da;p=thirdparty%2Fkea.git [1081] Disable log4cplus internal logging unless --enable-debug was specified at configure --- diff --git a/src/lib/log/logger_manager_impl.cc b/src/lib/log/logger_manager_impl.cc index 6862d0cb51..711eae9cc9 100644 --- a/src/lib/log/logger_manager_impl.cc +++ b/src/lib/log/logger_manager_impl.cc @@ -12,6 +12,8 @@ // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. +#include + #include #include @@ -21,6 +23,7 @@ #include #include #include +#include #include #include @@ -196,6 +199,13 @@ void LoggerManagerImpl::initRootLogger(isc::log::Severity severity, { log4cplus::Logger::getDefaultHierarchy().resetConfiguration(); + // Disable log4cplus' own logging, unless --enable-debug was + // specified to configure. Note that this does not change + // LogLog's levels (that is still just INFO). +#ifndef ENABLE_DEBUG + log4cplus::helpers::LogLog::getLogLog()->setQuietMode(true); +#endif + // Set the log4cplus root to not output anything - effectively we are // ignoring it. log4cplus::Logger::getRoot().setLogLevel(log4cplus::OFF_LOG_LEVEL);