OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
otb::Logger Class Reference

#include <otbLogger.h>

+ Inheritance diagram for otb::Logger:
+ Collaboration diagram for otb::Logger:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef Logger Self
 
typedef itk::Logger Superclass
 

Public Member Functions

std::string BuildFormattedEntry (itk::Logger::PriorityLevelType, std::string const &) override
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
bool IsLogSetupInformationDone ()
 
 itkCloneMacro (Logger) void LogSetupInformation()
 
void LogSetupInformationDone ()
 
void ResetOutputs ()
 

Static Public Member Functions

static LoggerInstance ()
 
static Pointer New ()
 

Protected Member Functions

 Logger ()
 
virtual ~Logger () override=default
 

Private Member Functions

 Logger (const Self &)=delete
 
void operator= (const Self &)=delete
 

Static Private Member Functions

static LoggerCreateInstance ()
 

Private Attributes

bool m_LogSetupInfoDone
 

Detailed Description

An ITK logger specialized for OTB.

Sets OTB wide settings in its constructor

Definition at line 40 of file otbLogger.h.

Member Typedef Documentation

◆ ConstPointer

typedef itk::SmartPointer<const Self> otb::Logger::ConstPointer

Definition at line 46 of file otbLogger.h.

◆ Pointer

typedef itk::SmartPointer<Self> otb::Logger::Pointer

Definition at line 45 of file otbLogger.h.

◆ Self

Definition at line 43 of file otbLogger.h.

◆ Superclass

typedef itk::Logger otb::Logger::Superclass

Definition at line 44 of file otbLogger.h.

Constructor & Destructor Documentation

◆ Logger() [1/2]

otb::Logger::Logger ( )
protected

◆ ~Logger()

virtual otb::Logger::~Logger ( )
overrideprotectedvirtualdefault

◆ Logger() [2/2]

otb::Logger::Logger ( const Self )
privatedelete

Member Function Documentation

◆ BuildFormattedEntry()

std::string otb::Logger::BuildFormattedEntry ( itk::Logger::PriorityLevelType  ,
std::string const &   
)
override

◆ CreateAnother()

virtual::itk::LightObject::Pointer otb::Logger::CreateAnother ( void  ) const

◆ CreateInstance()

static Logger* otb::Logger::CreateInstance ( )
staticprivate

◆ GetNameOfClass()

virtual const char* otb::Logger::GetNameOfClass ( ) const
virtual

◆ Instance()

static Logger* otb::Logger::Instance ( )
static

If Logger crashes when called from the destructor of a static or global object, the singleton might have already been destroyed. You can prolong its lifetime by calling Logger::Instance() from that object's constructor.

See https://stackoverflow.com/questions/335369/finding-c-static-initialization-order-problems#335746

Referenced by otb::StreamingImageVirtualWriter< TInputImage >::GenerateData(), otb::ImageFileWriter< TImage >::GenerateOutputInformation(), and main().

◆ IsLogSetupInformationDone()

bool otb::Logger::IsLogSetupInformationDone ( )

Return true if the LogSetupInformation has already been called

◆ itkCloneMacro()

otb::Logger::itkCloneMacro ( Logger  )

Output logs about the RAM, caching and multi-threading settings

◆ LogSetupInformationDone()

void otb::Logger::LogSetupInformationDone ( )

Set the flag m_LogSetupInfoDone to true

◆ New()

static Pointer otb::Logger::New ( )
static

◆ operator=()

void otb::Logger::operator= ( const Self )
privatedelete

◆ ResetOutputs()

void otb::Logger::ResetOutputs ( )

Member Data Documentation

◆ m_LogSetupInfoDone

bool otb::Logger::m_LogSetupInfoDone
private

Definition at line 88 of file otbLogger.h.


The documentation for this class was generated from the following file: