Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitk::LogBackendText Class Referenceabstract

Abstract superclass for text-based log backends. More...

#include <mitkLogBackendText.h>

Inheritance diagram for mitk::LogBackendText:
Collaboration diagram for mitk::LogBackendText:

Public Member Functions

 ~LogBackendText () override
 
void ProcessMessage (const LogMessage &message) override=0
 Called by the MITK log mechanism if the object is registered and a log message is emitted. More...
 
- Public Member Functions inherited from mitk::LogBackendBase
virtual ~LogBackendBase ()
 
virtual OutputType GetOutputType () const =0
 

Protected Member Functions

void FormatSmart (const LogMessage &message, int threadID=0)
 Format the given message in the smart/short format and writes it to std::cout. More...
 
void FormatFull (const LogMessage &message, int threadID=0)
 Format the given message in the full/long format and writes it to std::cout. More...
 
void FormatSmart (std::ostream &out, const LogMessage &message, int threadID=0)
 Format the given message in the smart/short format and writes it to the given std::ostream. More...
 
void FormatFull (std::ostream &out, const LogMessage &message, int threadID=0)
 Format the given message in the full/long format and writes it to the given std::ostream. More...
 
void AppendTimeStamp (std::ostream &out)
 Write system time to the given stream. More...
 
void FormatSmartWindows (const LogMessage &message, int)
 Special variant of method FormatSmart which uses colored messages (only for Windows). More...
 

Additional Inherited Members

- Public Types inherited from mitk::LogBackendBase
enum  OutputType { OutputType::Console, OutputType::File, OutputType::Other }
 

Detailed Description

Abstract superclass for text-based log backends.

Adds string formatting methods to the interface LogBackendBase. Backends that inherit from this class can be registered by the MITK log mechanism.

Definition at line 25 of file mitkLogBackendText.h.

Constructor & Destructor Documentation

◆ ~LogBackendText()

mitk::LogBackendText::~LogBackendText ( )
override

Member Function Documentation

◆ AppendTimeStamp()

void mitk::LogBackendText::AppendTimeStamp ( std::ostream &  out)
protected

Write system time to the given stream.

◆ FormatFull() [1/2]

void mitk::LogBackendText::FormatFull ( const LogMessage message,
int  threadID = 0 
)
protected

Format the given message in the full/long format and writes it to std::cout.

Parameters
message
threadIDCan be set to the thread id where the log message was emitted. 0 by default.

◆ FormatFull() [2/2]

void mitk::LogBackendText::FormatFull ( std::ostream &  out,
const LogMessage message,
int  threadID = 0 
)
protected

Format the given message in the full/long format and writes it to the given std::ostream.

Parameters
out
message
threadIDCan be set to the thread id where the log message was emitted. 0 by default.

◆ FormatSmart() [1/2]

void mitk::LogBackendText::FormatSmart ( const LogMessage message,
int  threadID = 0 
)
protected

Format the given message in the smart/short format and writes it to std::cout.

Parameters
message
threadIDCan be set to the thread id where the log message was emitted. 0 by default.

◆ FormatSmart() [2/2]

void mitk::LogBackendText::FormatSmart ( std::ostream &  out,
const LogMessage message,
int  threadID = 0 
)
protected

Format the given message in the smart/short format and writes it to the given std::ostream.

Parameters
out
message
threadIDCan be set to the thread id where the log message was emitted. 0 by default.

◆ FormatSmartWindows()

void mitk::LogBackendText::FormatSmartWindows ( const LogMessage message,
int   
)
protected

Special variant of method FormatSmart which uses colored messages (only for Windows).

◆ ProcessMessage()

void mitk::LogBackendText::ProcessMessage ( const LogMessage message)
overridepure virtual

Called by the MITK log mechanism if the object is registered and a log message is emitted.

Parameters
messageLogging message which was emitted.

Implements mitk::LogBackendBase.

Implemented in mitk::LogBackendCout, and mitk::LogBackend.


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