openDAQ
Open data acquisition platform
Logger sink
+ Collaboration diagram for Logger sink:

Detailed Description

Modules

 Factories
 

Classes

struct  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. More...
 
class  LoggerSinkPtr
 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...
 

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.
 

Function Documentation

◆ getLevel()

daq::LogLevel getLevel ( ) const
inline

Gets the minimal severity level of messages to be written to the target.

Returns
The log severity level of the sink.

◆ setLevel()

void setLevel ( daq::LogLevel  level) const
inline

Sets the minimal severity level of messages to be written to the target.

Parameters
levelThe log severity level of the sink.

◆ setPattern()

void setPattern ( const daq::StringPtr &  pattern) const
inline

Sets the custom formatter pattern for the sink.

Parameters
patternThe formatter pattern string.

◆ shouldLog()

daq::Bool shouldLog ( daq::LogLevel  level) const
inline

Checks whether the messages with given log severity level will be written to the target or not.

Parameters
levelThe severity level of messages.
Returns
True if the messages with level will be written to the target; false otherwise.