OTB  6.7.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 Self
ConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef Logger Self
 
typedef itk::Logger Superclass
 
- Public Types inherited from itk::Logger
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Logger Self
 
typedef LoggerBase Superclass
 
- Public Types inherited from itk::LoggerBase
typedef SmartPointer< const SelfConstPointer
 
typedef
MultipleLogOutput::OutputType 
OutputType
 
typedef SmartPointer< SelfPointer
 
enum  PriorityLevelType
 
typedef LoggerBase Self
 
typedef Object Superclass
 
enum  TimeStampFormatType
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

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 ()
 
void LogSetupInformation ()
 
void LogSetupInformationDone ()
 
- Public Member Functions inherited from itk::LoggerBase
virtual void AddLogOutput (OutputType *output)
 
void Critical (std::string const &message)
 
void Debug (std::string const &message)
 
void Error (std::string const &message)
 
void Fatal (std::string const &message)
 
virtual void Flush ()
 
virtual const char * GetHumanReadableFormat () const
 
virtual PriorityLevelType GetLevelForFlushing () const
 
virtual const char * GetName () const
 
virtual PriorityLevelType GetPriorityLevel () const
 
virtual const TimeStampFormatTypeGetTimeStampFormat () const
 
void Info (std::string const &message)
 
virtual void SetHumanReadableFormat (const char *_arg)
 
virtual void SetLevelForFlushing (PriorityLevelType level)
 
virtual void SetName (const char *_arg)
 
virtual void SetPriorityLevel (PriorityLevelType level)
 
virtual void SetTimeStampFormat (TimeStampFormatType _arg)
 
void Warning (std::string const &message)
 
virtual void Write (PriorityLevelType level, std::string const &content)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer Instance ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Logger
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 Logger ()
 
virtual ~Logger () override
 
- Protected Member Functions inherited from itk::Logger
 Logger ()
 
- Protected Member Functions inherited from itk::LoggerBase
 LoggerBase ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual ~LoggerBase ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

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

Static Private Member Functions

static Pointer CreateInstance ()
 

Private Attributes

bool m_LogSetupInfoDone
 

Additional Inherited Members

- Protected Attributes inherited from itk::LoggerBase
RealTimeClock::Pointer m_Clock
 
std::string m_HumanReadableFormat
 
PriorityLevelType m_LevelForFlushing
 
MultipleLogOutput::Pointer m_Output
 
PriorityLevelType m_PriorityLevel
 
TimeStampFormatType m_TimeStampFormat
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Detailed Description

An ITK logger specialized for OTB.

Sets OTB wide settings in its constructor

Definition at line 39 of file otbLogger.h.

Member Typedef Documentation

Definition at line 45 of file otbLogger.h.

Definition at line 44 of file otbLogger.h.

Definition at line 42 of file otbLogger.h.

Definition at line 43 of file otbLogger.h.

Constructor & Destructor Documentation

otb::Logger::Logger ( )
protected
virtual otb::Logger::~Logger ( )
overrideprotectedvirtual

Reimplemented from itk::Logger.

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

Member Function Documentation

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

Reimplemented from itk::LoggerBase.

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

Reimplemented from itk::Logger.

static Pointer otb::Logger::CreateInstance ( )
staticprivate
virtual const char* otb::Logger::GetNameOfClass ( ) const
virtual

Reimplemented from itk::Logger.

static Pointer 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< TInputImage >::GenerateOutputInformation(), and main().

bool otb::Logger::IsLogSetupInformationDone ( )

Return true if the LogSetupInformation has already been called

void otb::Logger::LogSetupInformation ( )

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

void otb::Logger::LogSetupInformationDone ( )

Set the flag m_LogSetupInfoDone to true

static Pointer otb::Logger::New ( )
static
void otb::Logger::operator= ( const Self )
privatedelete

Member Data Documentation

bool otb::Logger::m_LogSetupInfoDone
private

Definition at line 83 of file otbLogger.h.


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