diff --git a/Modules/Core/Common/src/otbLogger.cxx b/Modules/Core/Common/src/otbLogger.cxx index c088a2d5a0e0c9c5b5c3ae3008299044e655f81e..98b099ac5727190b1492bed00ce1a1d6c39243a8 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);