diff --git a/Modules/Core/Common/src/otbLogger.cxx b/Modules/Core/Common/src/otbLogger.cxx index b3730cf445a5816ca693da32de7d2a71f3aaba37..51cc7adae9718e6671ea911be78daa04057c6174 100644 --- a/Modules/Core/Common/src/otbLogger.cxx +++ b/Modules/Core/Common/src/otbLogger.cxx @@ -38,9 +38,6 @@ Logger::Pointer Logger::CreateInstance() defaultOutput->SetStream(std::cout); instance->AddLogOutput(defaultOutput); - - // Log setup information - instance->LogSetupInformation(); return instance; } diff --git a/Modules/IO/TestKernel/include/otbTestMain.h b/Modules/IO/TestKernel/include/otbTestMain.h index ccb70a639cc5ec5a295d775affc2d5a510747c7d..7a833306b5ecfd8e6b434488a0932f3fdc2a5933 100644 --- a/Modules/IO/TestKernel/include/otbTestMain.h +++ b/Modules/IO/TestKernel/include/otbTestMain.h @@ -28,7 +28,7 @@ #include <iostream> #include "itkMultiThreader.h" -#include "itkMacro.h" +#include "otbMacro.h" #include "otbOGRDriversInit.h" #include "otbTestHelper.h" @@ -298,6 +298,7 @@ int main(int ac, char* av[]) } else { + otb::Logger::Instance()->LogSetupInformation(); MainFuncPointer f = j->second; int result; try diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 7aec4f87620aa6917040ee282d4c5e0110848d53..b700c4c2894516229434cd769a580224379820b7 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -645,6 +645,8 @@ int Application::ExecuteAndWriteOutput() { m_Chrono.Restart(); + m_Logger->LogSetupInformation(); + int status = this->Execute(); if (status == 0)