Shorthand macros to write an output to the logger.
More...
|
template<typename T > |
using | MutLog = logging::attrs::mutable_constant< T, std::shared_mutex > |
|
Shorthand macros to write an output to the logger.
◆ CUSTOM_LOG
#define CUSTOM_LOG |
( |
|
logger, |
|
|
|
sev |
|
) |
| |
Value:
set_get_attrib("Line", __LINE__); \
set_get_attrib("Func", Str{__PRETTY_FUNCTION__}); \
BOOST_LOG_SEV(logger, sev)
Wrapper around the logger call for setting the 'File', 'Line', and 'Func' attributes.
◆ LOG_D
◆ LOG_E
◆ LOG_F
◆ LOG_I
◆ LOG_T
◆ LOG_W
◆ MutLog
template<typename T >
using MutLog = logging::attrs::mutable_constant<T, std::shared_mutex> |
Type alias for mutable constant template used in the logging. The application might run in the multithreaded mode, so shared mutex is used for guarding access to the data.
◆ get_logger() [1/3]
◆ get_logger() [2/3]
◆ get_logger() [3/3]
◆ set_get_attrib()
template<typename ValueType >
auto set_get_attrib |
( |
const char * |
name, |
|
|
ValueType |
value |
|
) |
| -> ValueType |
Set value of the attribute and return a reference to it, for further modifications.
- Note
- The type of the value must match exactly with the original attribute declaration - using
const char*
instead of the std::string
will result in the exception