|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
A single log message (log event) of the MITK log mechanism. More...
#include <mitkLogMessage.h>

Public Member Functions | |
| LogMessage (const LogLevel level, const std::string &filePath, const int lineNumber, const std::string &functionName) | |
| Construct a log message with source location information. More... | |
Public Attributes | |
| const LogLevel | Level |
| Severity level of the log message. More... | |
| const std::string | FilePath |
| Absolute or relative path of the source file where the log message was emitted. More... | |
| const int | LineNumber |
| Line number in the source file where the log message was emitted. More... | |
| const std::string | FunctionName |
| Name of the function or method where the log message was emitted. More... | |
| std::string | ModuleName |
| Name of the MITK module where the log message was emitted. More... | |
| std::string | Category |
| Optional user-defined category for the log event. More... | |
| std::string | Message |
| The actual log message text. More... | |
A single log message (log event) of the MITK log mechanism.
Encapsulates all metadata and content for a single log event, including source location, severity level, module name, optional category, and the message text.
Log messages should only be created by the macros provided in mitkLog.h (MITK_INFO, MITK_WARN, MITK_ERROR, MITK_FATAL, MITK_DEBUG) through the PseudoLogStream class. Upon destruction of the stream, the message is distributed to all registered backends via DistributeToBackends().
Definition at line 36 of file mitkLogMessage.h.
| mitk::LogMessage::LogMessage | ( | const LogLevel | level, |
| const std::string & | filePath, | ||
| const int | lineNumber, | ||
| const std::string & | functionName | ||
| ) |
Construct a log message with source location information.
| [in] | level | Severity level of the log message. |
| [in] | filePath | Absolute or relative path of the source file where the message was emitted. |
| [in] | lineNumber | Line number in the source file where the message was emitted. |
| [in] | functionName | Name of the function or method where the message was emitted. |
| std::string mitk::LogMessage::Category |
Optional user-defined category for the log event.
Categories can be set via the PseudoLogStream::operator()(const std::string&) call. Multiple categories are concatenated with a dot separator (e.g. "module.subsystem").
Definition at line 84 of file mitkLogMessage.h.
| const std::string mitk::LogMessage::FilePath |
Absolute or relative path of the source file where the log message was emitted.
Typically populated by the FILE preprocessor macro.
Definition at line 58 of file mitkLogMessage.h.
| const std::string mitk::LogMessage::FunctionName |
Name of the function or method where the log message was emitted.
Typically populated by the FUNCTION preprocessor macro.
Definition at line 70 of file mitkLogMessage.h.
| const LogLevel mitk::LogMessage::Level |
Severity level of the log message.
Set at construction time and remains constant for the lifetime of the message.
Definition at line 52 of file mitkLogMessage.h.
| const int mitk::LogMessage::LineNumber |
Line number in the source file where the log message was emitted.
Typically populated by the LINE preprocessor macro.
Definition at line 64 of file mitkLogMessage.h.
| std::string mitk::LogMessage::Message |
The actual log message text.
Assembled from all data streamed into PseudoLogStream via operator<<. Trailing whitespace is trimmed before distribution to backends.
Definition at line 91 of file mitkLogMessage.h.
| std::string mitk::LogMessage::ModuleName |
Name of the MITK module where the log message was emitted.
Automatically set by PseudoLogStream from the MITKLOG_MODULENAME macro before the message is distributed to backends.
Definition at line 77 of file mitkLogMessage.h.