class
#include <modbuscpp/details/logger.hpp>
logger
Contents
Public static functions
-
template<typename Logger = logger, typename... Args, typename = std::enable_if_t<std::is_base_of_v<logger, Logger>>>static void create(Args && ... args)
- static void set(Logger* instance)
- static auto get() -> logger*
-
template<typename FormatString, typename... Args>static void info(const FormatString& fmt, Args && ... args)
-
template<typename FormatString, typename... Args>static void error(const FormatString& fmt, Args && ... args)
-
template<typename FormatString, typename... Args>static void debug(const FormatString& fmt, Args && ... args)
- static void info(const std::string& message) noexcept
- static void error(const std::string& message) noexcept
- static void debug(const std::string& message) noexcept
Constructors, destructors, conversion operators
Public functions
- void set_debug(bool debug__) noexcept
Protected functions
-
template<typename FormatString, typename... Args>void info_impl(const FormatString& fmt, Args && ... args) const
-
template<typename FormatString, typename... Args>void error_impl(const FormatString& fmt, Args && ... args) const
-
template<typename FormatString, typename... Args>void debug_impl(const FormatString& fmt, Args && ... args) const
- void info_impl(const std::string& message) const virtual noexcept
- void error_impl(const std::string& message) const virtual noexcept
- void debug_impl(const std::string& message) const virtual noexcept
Protected variables
- bool debug_
Function documentation
template<typename Logger = logger, typename... Args, typename = std::enable_if_t<std::is_base_of_v<logger, Logger>>>
static void modbus:: logger:: create(Args && ... args)
Template parameters | |
---|---|
Logger | logger derivative type |
Args | arguments type |
Parameters | |
args | arguments to pass to constructor |
Create singleton instance
template<typename FormatString, typename... Args>
static void modbus:: logger:: info(const FormatString& fmt,
Args && ... args)
Template parameters | |
---|---|
FormatString | string format type |
Args | arguments type |
Parameters | |
fmt | string format |
args | arguments |
Log info message to stdout
template<typename FormatString, typename... Args>
static void modbus:: logger:: error(const FormatString& fmt,
Args && ... args)
Template parameters | |
---|---|
FormatString | string format type |
Args | arguments type |
Parameters | |
fmt | string format |
args | arguments |
Log error message to stdout
template<typename FormatString, typename... Args>
static void modbus:: logger:: debug(const FormatString& fmt,
Args && ... args)
Template parameters | |
---|---|
FormatString | string format type |
Args | arguments type |
Parameters | |
fmt | string format |
args | arguments |
Log debug message to stdout
static void modbus:: logger:: info(const std::string& message) noexcept
Parameters | |
---|---|
message | message to log |
Log info message to stdout
static void modbus:: logger:: error(const std::string& message) noexcept
Parameters | |
---|---|
message | message to log |
Log error message to stdout
static void modbus:: logger:: debug(const std::string& message) noexcept
Parameters | |
---|---|
message | message to log |
Log debug message
modbus:: logger:: logger(bool debug = false) explicit
Parameters | |
---|---|
debug | debug status |
logger constructor
modbus:: logger:: ~logger() virtual
logger destructor
void modbus:: logger:: set_debug(bool debug__) noexcept
Parameters | |
---|---|
debug__ | debug status |
Set debug status
template<typename FormatString, typename... Args>
void modbus:: logger:: info_impl(const FormatString& fmt,
Args && ... args) const protected
Template parameters | |
---|---|
FormatString | string format type |
Args | arguments type |
Parameters | |
fmt | string format |
args | arguments |
Log info message to stdout
template<typename FormatString, typename... Args>
void modbus:: logger:: error_impl(const FormatString& fmt,
Args && ... args) const protected
Template parameters | |
---|---|
FormatString | string format type |
Args | arguments type |
Parameters | |
fmt | string format |
args | arguments |
Log error message to stdout
template<typename FormatString, typename... Args>
void modbus:: logger:: debug_impl(const FormatString& fmt,
Args && ... args) const protected
Template parameters | |
---|---|
FormatString | string format type |
Args | arguments type |
Parameters | |
fmt | string format |
args | arguments |
Log debug message to stdout
void modbus:: logger:: info_impl(const std::string& message) const virtual protected noexcept
Parameters | |
---|---|
message | message to log |
Log info message to stdout
void modbus:: logger:: error_impl(const std::string& message) const virtual protected noexcept
Parameters | |
---|---|
message | message to log |
Log error message to stdout
void modbus:: logger:: debug_impl(const std::string& message) const virtual protected noexcept
Parameters | |
---|---|
message | message to log |
Log debug message
Variable documentation
bool modbus:: logger:: debug_ protected
Debug