rodbus (C++ API) 1.3.1
Loading...
Searching...
No Matches
rodbus::Logging Class Reference

Provides a static method for configuring logging. More...

#include <rodbus.hpp>

Static Public Member Functions

static void configure (const LoggingConfig &config, std::unique_ptr< Logger > logger)
 Set the callback that will receive all the log messages. More...
 

Detailed Description

Provides a static method for configuring logging.

Member Function Documentation

◆ configure()

static void rodbus::Logging::configure ( const LoggingConfig config,
std::unique_ptr< Logger logger 
)
static

Set the callback that will receive all the log messages.

There is only a single globally allocated logger. Calling this method a second time will return an error.

If this method is never called, no logging will be performed.

Parameters
configConfiguration options for logging
loggerLogger that will receive each logged message
Exceptions
ParamException

The documentation for this class was generated from the following file: