Logs messages produced by a specific part of openDAC SDK. The messages are written into the Logger Sinks associated with the Logger Component object. More...
Inherits ObjectPtr< ILoggerComponent >.
Logs messages produced by a specific part of openDAC SDK. The messages are written into the Logger Sinks associated with the Logger Component object.
The set of associated sinks is initialized on the Logger Component object creation and cannot be changed after.
Logger Component allows to set up a threshold log severity level, so the messages with lower level will not be registered. Additionally, it provides the ability to trigger writing out messages stored in temporary buffers or set up the minimum severity level of messages to be written out automatically, see flushOnLevel
method.
Public Member Functions | |
daq::StringPtr | getName () const |
Gets the name of the component. More... | |
void | setLevel (daq::LogLevel level) const |
Sets the minimal severity level of messages to be logged by the component. More... | |
daq::LogLevel | getLevel () const |
Gets the minimal severity level of messages to be logged by the component. More... | |
void | logMessage (daq::SourceLocation location, daq::ConstCharPtr msg, daq::LogLevel level) const |
Logs a message with the provided source location and severity level. More... | |
void | setPattern (const daq::StringPtr &pattern) const |
Sets the custom formatter pattern for the component. More... | |
daq::Bool | shouldLog (daq::LogLevel level) const |
Checks whether the messages with given log severity level will be logged or not. More... | |
void | flush () const |
Triggers writing out the messages stored in temporary buffers. | |
void | flushOnLevel (daq::LogLevel level) const |
Sets the minimum severity level of messages to be automatically written to the associated sinks bypassing the temporary buffers. More... | |