diff --git a/Code/ApplicationEngine/otbWrapperApplication.cxx b/Code/ApplicationEngine/otbWrapperApplication.cxx index 3604dc62c2dc87055e4bb15a3fb183309d193adc..3563cd4ae5bd5b38788d9dcd619c9245cc46759d 100644 --- a/Code/ApplicationEngine/otbWrapperApplication.cxx +++ b/Code/ApplicationEngine/otbWrapperApplication.cxx @@ -52,7 +52,7 @@ Application::Application() // Don't call Init from the constructor, since it calls a virtual method ! m_Logger->SetName("Application.logger"); - m_Logger->SetPriorityLevel(itk::LoggerBase::INFO); + m_Logger->SetPriorityLevel(itk::LoggerBase::DEBUG); m_Logger->SetLevelForFlushing(itk::LoggerBase::CRITICAL); } diff --git a/Code/ApplicationEngine/otbWrapperApplication.h b/Code/ApplicationEngine/otbWrapperApplication.h index a84146f4353721d00b5f0d01432286c105592161..1fd4c9fa65d0ddccf99afc28c43650f4cc1c5a19 100644 --- a/Code/ApplicationEngine/otbWrapperApplication.h +++ b/Code/ApplicationEngine/otbWrapperApplication.h @@ -25,7 +25,9 @@ #include "otbWrapperTypes.h" #include "otbWrapperParameterGroup.h" + #include "itkLogger.h" +#include "otbWrapperMacros.h" namespace otb { diff --git a/Code/ApplicationEngine/otbWrapperMacros.h b/Code/ApplicationEngine/otbWrapperMacros.h new file mode 100644 index 0000000000000000000000000000000000000000..cdd3103a36861f6a0b67d4abd8e99e0ab4a2e795 --- /dev/null +++ b/Code/ApplicationEngine/otbWrapperMacros.h @@ -0,0 +1,64 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ +#ifndef __otbWrapperMacros_h +#define __otbWrapperMacros_h + + +#define otbAppLogFATAL(x) \ + { \ + std::ostringstream message; \ + message << "" x << std::endl; \ + this->GetLogger()->Write( itk::LoggerBase::FATAL, message.str() ); \ + } + +#define otbAppLogCRITICAL(x) \ + { \ + std::ostringstream message; \ + message << "" x << std::endl; \ + this->GetLogger()->Write( itk::LoggerBase::CRITICAL, message.str() ); \ + } + +#define otbAppLogERROR(x) \ + { \ + std::ostringstream message; \ + message << "" x << std::endl; \ + this->GetLogger()->Write( itk::LoggerBase::ERROR, message.str() ); \ + } + +#define otbAppLogWARNING(x) \ + { \ + std::ostringstream message; \ + message << "" x << std::endl; \ + this->GetLogger()->Write( itk::LoggerBase::WARNING, message.str() ); \ + } + +#define otbAppLogINFO(x) \ + { \ + std::ostringstream message; \ + message << "" x << std::endl; \ + this->GetLogger()->Write( itk::LoggerBase::INFO, message.str() ); \ + } + +#define otbAppLogDEBUG(x) \ + { \ + std::ostringstream message; \ + message << "" x << std::endl; \ + this->GetLogger()->Write( itk::LoggerBase::DEBUG, message.str() ); \ + } + +#endif