Commit fb95fe77 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[1081] Disable log4cplus internal logging

unless --enable-debug was specified at configure
parent 2039944b
......@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <algorithm>
#include <iostream>
......@@ -21,6 +23,7 @@
#include <log4cplus/consoleappender.h>
#include <log4cplus/fileappender.h>
#include <log4cplus/syslogappender.h>
#include <log4cplus/helpers/loglog.h>
#include <log/logger.h>
#include <log/logger_support.h>
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment