ModbusSMA  v1.0.0
modbusSMA::log Namespace Reference

Namespace for logging related functions. More...

Typedefs

typedef std::shared_ptr< spdlog::logger > LOGGER
 Typedef for the spdlog logger.
 

Functions

LOGGER initialize (std::vector< spdlog::sink_ptr > _sinks={})
 Initializes the logger for the ModbusSMA library. More...
 
LOGGER get ()
 Returns the logger used in the modbusSMA library. More...
 

Detailed Description

Namespace for logging related functions.

Function Documentation

◆ get()

log::LOGGER modbusSMA::log::get ( )

Returns the logger used in the modbusSMA library.

Default initializes the logger if it is not already initialized.

Definition at line 58 of file Logging.cpp.

◆ initialize()

log::LOGGER modbusSMA::log::initialize ( std::vector< spdlog::sink_ptr >  _sinks = {})

Initializes the logger for the ModbusSMA library.

If no sinks are specified, the default stdout_color_mt logger is used. Does nothing if the logger already exists.

Parameters
_sinksSinks to add to the logger
Returns
the created logger

Definition at line 36 of file Logging.cpp.