Commit dfac7406 authored by Julien Michel's avatar Julien Michel

MRG

parents d4228e21 8b01f6b6
......@@ -45,12 +45,13 @@ public:
itkTypeMacro(Logger, itk::Logger);
static Pointer Instance();
itkNewMacro(Self);
// Overwrite this to provide custom formatting of log entries
virtual std::string BuildFormattedEntry(itk::Logger::PriorityLevelType, std::string const&) ITK_OVERRIDE;
protected:
itkNewMacro(Self);
Logger();
virtual ~Logger() ITK_OVERRIDE;
......
......@@ -101,7 +101,6 @@ public:
m_Name = name;
GetDocExample()->SetApplicationName(name);
this->Modified();
m_Logger->SetName(name);
}
itkGetStringMacro(Name);
......@@ -709,9 +708,6 @@ public:
otb::Logger* GetLogger() const;
/** Sets the logger instance of the application (use with caution) */
void SetLogger(otb::Logger *logger);
itk::ProcessObject* GetProgressSource() const;
std::string GetProgressDescription() const;
......@@ -984,7 +980,6 @@ private:
std::string m_Name;
std::string m_Description;
ParameterGroup::Pointer m_ParameterList;
otb::Logger::Pointer m_Logger;
itk::ProcessObject::Pointer m_ProgressSource;
std::string m_ProgressSourceDescription;
......
......@@ -46,6 +46,7 @@
#include <exception>
#include "itkMacro.h"
namespace otb
{
namespace Wrapper
......@@ -54,7 +55,6 @@ namespace Wrapper
Application::Application()
: m_Name(""),
m_Description(""),
m_Logger(otb::Logger::New()),
m_ProgressSourceDescription(""),
m_DocName(""),
m_DocLongDescription(""),
......@@ -66,10 +66,7 @@ Application::Application()
m_HaveInXML(true),
m_HaveOutXML(true),
m_IsInXMLParsed(false)
{
// Don't call Init from the constructor, since it calls a virtual method !
m_Logger->SetName("Application.logger");
}
{}
Application::~Application()
{
......@@ -77,15 +74,7 @@ Application::~Application()
otb::Logger* Application::GetLogger() const
{
return m_Logger;
}
void Application::SetLogger(otb::Logger *logger)
{
if (m_Logger != logger)
{
m_Logger = logger;
}
return otb::Logger::Instance();
}
std::vector<std::string>
......@@ -1667,11 +1656,6 @@ Application::IsParameterMissing(const std::string &key) const
}
level++;
}
if (ret)
{
// the missing parameter is on an active branch : we need it
otbDebugMacro("MISSING : "<< key << " (Level "<< split.size()<<")");
}
}
return ret;
}
......
......@@ -62,8 +62,6 @@ CompositeApplication
InternalApplication container;
container.App = ApplicationRegistry::CreateApplication(appType);
container.Desc = desc;
// Setup logger
container.App->SetLogger(this->GetLogger());
container.App->AddObserver(AddProcessToWatchEvent(), m_AddProcessCommand.GetPointer());
m_AppContainer[key] = container;
return true;
......
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