Medical Imaging Interaction Toolkit  2018.4.99-7e02155b
Medical Imaging Interaction Toolkit
mbilog::BackendCout Class Reference

Default backend of the mbi logging mechanism. This backend is used if no other backend is registered. The backend formats the logging messages to a normal string and writes them to std::cout. More...

#include <mbilogBackendCout.h>

Inheritance diagram for mbilog::BackendCout:
Collaboration diagram for mbilog::BackendCout:

Public Member Functions

 BackendCout ()
 
 ~BackendCout () override
 
void ProcessMessage (const mbilog::LogMessage &l) override
 This method is called by the mbi logging mechanism if the object is registered in the mbi logging mechanism and a logging message is emitted. The method formats the logging messages to a normal string (depending on formatting mode) and writes it to std::cout. More...
 
void SetFull (bool full)
 Sets the formatting mode. If true long messages will be displayed. Default is false (short/smart messages). Long messages provide all informations and are also capable to be postproccessed (e.g. in a web viewer). More...
 
OutputType GetOutputType () const override
 
- Public Member Functions inherited from mbilog::TextBackendBase
 ~TextBackendBase () override
 
- Public Member Functions inherited from mbilog::BackendBase
virtual ~BackendBase ()
 

Additional Inherited Members

- Protected Member Functions inherited from mbilog::TextBackendBase
void FormatSmart (const LogMessage &l, int threadID=0)
 Method formats the given LogMessage in the smart/short format and writes it to std::cout. More...
 
void FormatFull (const LogMessage &l, int threadID=0)
 Method formats the given LogMessage in the full/long format and writes it to std::cout. More...
 
void FormatSmart (std::ostream &out, const LogMessage &l, int threadID=0)
 Method formats the given LogMessage in the smart/short format and writes it to the given std::ostream. More...
 
void FormatFull (std::ostream &out, const LogMessage &l, int threadID=0)
 Method formats the given LogMessage in the full/long format and writes it to the given std::ostream. More...
 
void AppendTimeStamp (std::ostream &out)
 Writes the system time to the given stream. More...
 
void FormatSmartWindows (const mbilog::LogMessage &l, int)
 Special variant of method FormatSmart which uses colored messages (only for windows). More...
 

Detailed Description

Default backend of the mbi logging mechanism. This backend is used if no other backend is registered. The backend formats the logging messages to a normal string and writes them to std::cout.

Definition at line 30 of file mbilogBackendCout.h.

Constructor & Destructor Documentation

◆ BackendCout()

mbilog::BackendCout::BackendCout ( )

◆ ~BackendCout()

mbilog::BackendCout::~BackendCout ( )
override

Member Function Documentation

◆ GetOutputType()

OutputType mbilog::BackendCout::GetOutputType ( ) const
overridevirtual
Returns
The type of this backend.

Implements mbilog::BackendBase.

◆ ProcessMessage()

void mbilog::BackendCout::ProcessMessage ( const mbilog::LogMessage l)
overridevirtual

This method is called by the mbi logging mechanism if the object is registered in the mbi logging mechanism and a logging message is emitted. The method formats the logging messages to a normal string (depending on formatting mode) and writes it to std::cout.

Parameters
logMessageLogging message.

Implements mbilog::TextBackendBase.

◆ SetFull()

void mbilog::BackendCout::SetFull ( bool  full)

Sets the formatting mode. If true long messages will be displayed. Default is false (short/smart messages). Long messages provide all informations and are also capable to be postproccessed (e.g. in a web viewer).


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