Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
This class is an abstract superclass for logging text backends. It adds string formatting methods to the backend interface BackendBase. Accordingly backends that inherit from this class can be registered in the mbi logging mechanism. More...
#include <mbilogTextBackendBase.h>
Public Member Functions | |
~TextBackendBase () override | |
void | ProcessMessage (const mbilog::LogMessage &logMessage) override=0 |
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. More... | |
![]() | |
virtual | ~BackendBase () |
virtual OutputType | GetOutputType () const =0 |
Protected Member Functions | |
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... | |
This class is an abstract superclass for logging text backends. It adds string formatting methods to the backend interface BackendBase. Accordingly backends that inherit from this class can be registered in the mbi logging mechanism.
Documentation
Definition at line 28 of file mbilogTextBackendBase.h.
|
override |
Definition at line 28 of file mbilogTextBackendBase.cpp.
References compare(), mbilog::LogMessage::filePath, and mbilog::replace.
|
protected |
Writes the system time to the given stream.
Definition at line 398 of file mbilogTextBackendBase.cpp.
References mbilog::LogMessage::category, mbilog::Debug, mbilog::Error, mbilog::Fatal, FormatSmartWindows(), g_init, mbilog::Info, mbilog::LogMessage::level, mbilog::LogMessage::message, and mbilog::Warn.
Referenced by FormatFull(), and FormatSmart().
|
protected |
Method formats the given LogMessage in the full/long format and writes it to std::cout.
threadID | Can be set to the threadID where the logging message was emitted. Is 0 by default. |
Definition at line 393 of file mbilogTextBackendBase.cpp.
Referenced by mitk::LoggingBackend::ProcessMessage(), and mbilog::BackendCout::ProcessMessage().
|
protected |
Method formats the given LogMessage in the full/long format and writes it to the given std::ostream.
threadID | Can be set to the threadID where the logging message was emitted. Is 0 by default. |
Definition at line 331 of file mbilogTextBackendBase.cpp.
References AppendTimeStamp(), mbilog::LogMessage::category, mbilog::Debug, mbilog::Error, mbilog::Fatal, mbilog::LogMessage::filePath, mbilog::LogMessage::functionName, mbilog::Info, mbilog::LogMessage::level, mbilog::LogMessage::lineNumber, mbilog::LogMessage::message, mbilog::LogMessage::moduleName, and mbilog::Warn.
|
protected |
Method formats the given LogMessage in the smart/short format and writes it to std::cout.
threadID | Can be set to the threadID where the logging message was emitted. Is 0 by default. |
Definition at line 384 of file mbilogTextBackendBase.cpp.
References FormatSmartWindows().
Referenced by mitk::LoggingBackend::ProcessMessage(), and mbilog::BackendCout::ProcessMessage().
|
protected |
Method formats the given LogMessage in the smart/short format and writes it to the given std::ostream.
threadID | Can be set to the threadID where the logging message was emitted. Is 0 by default. |
Definition at line 251 of file mbilogTextBackendBase.cpp.
References AppendTimeStamp(), mbilog::LogMessage::category, mbilog::Debug, mbilog::Error, mbilog::Fatal, g_init, mbilog::Info, mbilog::LogMessage::level, mbilog::LogMessage::message, and mbilog::Warn.
|
protected |
Special variant of method FormatSmart which uses colored messages (only for windows).
Referenced by AppendTimeStamp(), and FormatSmart().
|
overridepure virtual |
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.
logMessage | Logging message which was emitted. |
Implements mbilog::BackendBase.
Implemented in mbilog::BackendCout, and mitk::LoggingBackend.