Represents the object that actually writes the log messages to the target. Each Logger Sink is responsible for only single target: file, console etc. More...
Inherits ObjectPtr< ILoggerSink >.
Represents the object that actually writes the log messages to the target. Each Logger Sink is responsible for only single target: file, console etc.
Logger Sink allows to set up a threshold log severity level, so the messages with lower level will not be written to the target.
Additionally, it provides the ability to customize format for messages written to the target, see setPattern
method.
Public Member Functions | |
void | setLevel (daq::LogLevel level) const |
Sets the minimal severity level of messages to be written to the target. More... | |
daq::LogLevel | getLevel () const |
Gets the minimal severity level of messages to be written to the target. More... | |
daq::Bool | shouldLog (daq::LogLevel level) const |
Checks whether the messages with given log severity level will be written to the target or not. More... | |
void | setPattern (const daq::StringPtr &pattern) const |
Sets the custom formatter pattern for the sink. More... | |
void | flush () const |
Triggers writing out the messages from temporary buffers to the target. | |