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

Detailed Description

Modules

 Factories
 

Classes

struct  ILogger
 Represents a collection of Logger Components with multiple Logger Sinks and a single Logger Thread Pool shared between components. More...
 
class  LoggerPtr
 Represents a collection of Logger Components with multiple Logger Sinks and a single Logger Thread Pool shared between components. More...
 

Functions

void setLevel (daq::LogLevel level) const
 Sets the default log severity level. More...
 
daq::LogLevel getLevel () const
 Gets the default log severity level. More...
 
daq::LoggerComponentPtr getOrAddComponent (const daq::StringPtr &name) const
 Gets an added component by name or creates a new one with a given name and adds it to the Logger object. More...
 
daq::LoggerComponentPtr addComponent (const daq::StringPtr &name) const
 Creates a component with a given name and adds it to the Logger object. More...
 
void removeComponent (const daq::StringPtr &name) const
 Removes the component with a given name from the Logger object. More...
 
daq::ListPtr< daq::ILoggerComponent > getComponents () const
 Gets a list of added components. More...
 
daq::LoggerComponentPtr getComponent (const daq::StringPtr &name) const
 Gets an added component by name. More...
 
void flush () const
 Triggers writing out the messages stored in temporary buffers for added components and sinks associated with the Logger object.
 
void flushOnLevel (daq::LogLevel level) const
 Sets the minimum severity level of messages to be automatically flushed by components of Logger object. More...
 

Function Documentation

◆ addComponent()

daq::LoggerComponentPtr addComponent ( const daq::StringPtr &  name) const
inline

Creates a component with a given name and adds it to the Logger object.

Parameters
nameThe component's name.
Returns
Added component.
Exceptions
InvalidParameterExceptionif name is empty string.

◆ flushOnLevel()

void flushOnLevel ( daq::LogLevel  level) const
inline

Sets the minimum severity level of messages to be automatically flushed by components of Logger object.

Parameters
levelThe log severity level.

◆ getComponent()

daq::LoggerComponentPtr getComponent ( const daq::StringPtr &  name) const
inline

Gets an added component by name.

Parameters
nameThe component's name.
Returns
The logger component with the name equal to name.
Exceptions
NotFoundExceptionif a component with the specified name was not added.

◆ getComponents()

daq::ListPtr<daq::ILoggerComponent> getComponents ( ) const
inline

Gets a list of added components.

Returns
The list of added components.

◆ getLevel()

daq::LogLevel getLevel ( ) const
inline

Gets the default log severity level.

Returns
The log severity level.

◆ getOrAddComponent()

daq::LoggerComponentPtr getOrAddComponent ( const daq::StringPtr &  name) const
inline

Gets an added component by name or creates a new one with a given name and adds it to the Logger object.

Parameters
nameThe component's name.
Returns
The logger component with the name equal to name.
Exceptions
InvalidParameterExceptionif name is empty string.

◆ removeComponent()

void removeComponent ( const daq::StringPtr &  name) const
inline

Removes the component with a given name from the Logger object.

Parameters
nameThe component's name.
Exceptions
NotFoundExceptionif a component with the specified name was not added.

◆ setLevel()

void setLevel ( daq::LogLevel  level) const
inline

Sets the default log severity level.

Parameters
levelThe log severity level.