CoreSDK  v1.0.0.b1304
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
r5::common::LoggerWrapper Class Reference

Helper object that simplfies use of ILogger. More...

#include <r5logger.h>

Public Member Functions

 LoggerWrapper (ILoggerPtr t)
 Default constructor. More...
 
template<class... Args>
void trace (const std::string format, const Args &... args)
 Log message with Trace log level. More...
 
template<class... Args>
void info (const std::string format, const Args &... args)
 Log message with Info log level. More...
 
template<class... Args>
void warn (const std::string format, const Args &... args)
 Log message with Warn log level. More...
 
template<class... Args>
void error (const std::string format, const Args &... args)
 Log message with Error log level. More...
 
template<class... Args>
void debug (const std::string format, const Args &... args)
 Log message with Debug log level. More...
 

Protected Member Functions

template<class... Args>
void log (LogLevel level, const std::string format, const Args &... args)
 Log message with specified log level. More...
 
template<class... Args>
void log (const std::chrono::system_clock::time_point &time, LogLevel level, const std::string format, const Args &... args)
 Log message with specified log level and timestamp. More...
 

Protected Attributes

ILoggerPtr mT
 internal pointer to logger instance
 

Detailed Description

Helper object that simplfies use of ILogger.

Constructor & Destructor Documentation

◆ LoggerWrapper()

r5::common::LoggerWrapper::LoggerWrapper ( ILoggerPtr  t)
inline

Default constructor.

Parameters
tpointer to logger implementation

Member Function Documentation

◆ debug()

template<class... Args>
void r5::common::LoggerWrapper::debug ( const std::string  format,
const Args &...  args 
)
inline

Log message with Debug log level.

Parameters
formatpointer to a null-terminated multibyte string specifying how to interpret the data
argsarguments specifying data to print

◆ error()

template<class... Args>
void r5::common::LoggerWrapper::error ( const std::string  format,
const Args &...  args 
)
inline

Log message with Error log level.

Parameters
formatpointer to a null-terminated multibyte string specifying how to interpret the data
argsarguments specifying data to print

◆ info()

template<class... Args>
void r5::common::LoggerWrapper::info ( const std::string  format,
const Args &...  args 
)
inline

Log message with Info log level.

Parameters
formatpointer to a null-terminated multibyte string specifying how to interpret the data
argsarguments specifying data to print

◆ log() [1/2]

template<class... Args>
void r5::common::LoggerWrapper::log ( LogLevel  level,
const std::string  format,
const Args &...  args 
)
inlineprotected

Log message with specified log level.

Parameters
levellog level for the message
formatpointer to a null-terminated multibyte string specifying how to interpret the data
argsarguments specifying data to print

◆ log() [2/2]

template<class... Args>
void r5::common::LoggerWrapper::log ( const std::chrono::system_clock::time_point &  time,
LogLevel  level,
const std::string  format,
const Args &...  args 
)
inlineprotected

Log message with specified log level and timestamp.

Parameters
timetimestamp for the message
levellog level for the message
formatpointer to a null-terminated multibyte string specifying how to interpret the data
argsarguments specifying data to print

◆ trace()

template<class... Args>
void r5::common::LoggerWrapper::trace ( const std::string  format,
const Args &...  args 
)
inline

Log message with Trace log level.

Parameters
formatpointer to a null-terminated multibyte string specifying how to interpret the data
argsarguments specifying data to print

◆ warn()

template<class... Args>
void r5::common::LoggerWrapper::warn ( const std::string  format,
const Args &...  args 
)
inline

Log message with Warn log level.

Parameters
formatpointer to a null-terminated multibyte string specifying how to interpret the data
argsarguments specifying data to print

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