From fcaf2cf35cf393054355ac9cc5c9960f2c7609ba Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@cnes.fr> Date: Wed, 21 Feb 2018 15:38:47 +0100 Subject: [PATCH] ENH: Use ConfigurationManager to configure log level in otb::Logger at instaciation time --- Modules/Core/Common/src/otbLogger.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Modules/Core/Common/src/otbLogger.cxx b/Modules/Core/Common/src/otbLogger.cxx index c088a2d5a0..98b099ac57 100644 --- a/Modules/Core/Common/src/otbLogger.cxx +++ b/Modules/Core/Common/src/otbLogger.cxx @@ -20,6 +20,7 @@ #include "otbLogger.h" #include "itksys/SystemTools.hxx" +#include "otbConfigurationManager.h" namespace otb { @@ -37,11 +38,7 @@ Logger::Pointer Logger::Instance() Logger::Logger() { -#if OTB_DEBUG - this->SetPriorityLevel(itk::LoggerBase::DEBUG); -#else - this->SetPriorityLevel(itk::LoggerBase::INFO); -#endif + this->SetPriorityLevel(otb::ConfigurationManager::GetLoggerLevel()); this->SetLevelForFlushing(itk::LoggerBase::CRITICAL); -- GitLab