#include <sstream>
#include <string>
Go to the source code of this file.
|
| #define | LOGLEVEL TRACE |
| #define | FUNCTION_SIGNATURE __func__ |
| #define | LOG_MSG(level, msg) |
| | Base macro. Uses a do-while(0) loop to scope variables and a compile-time 'if' check to strip out low-level logs.
|
| #define | LOG_SMSG(level, msg) |
| #define | LOG_CMSG(handler, level, msg) |
| #define | LOG_TRACE(msg) |
| #define | LOG_DEBUG(msg) |
| #define | LOG_INFO(msg) |
| #define | LOG_WARN(msg) |
| #define | LOG_ERROR(msg) |
| #define | LOG_FATAL(msg) |
| #define | LOG_STRACE(msg) |
| #define | LOG_SDEBUG(msg) |
| #define | LOG_SINFO(msg) |
| #define | LOG_SWARN(msg) |
| #define | LOG_SERROR(msg) |
| #define | LOG_SFATAL(msg) |
| #define | LOG_CTRACE(handler, msg) |
| #define | LOG_CDEBUG(handler, msg) |
| #define | LOG_CINFO(handler, msg) |
| #define | LOG_CWARN(handler, msg) |
| #define | LOG_CERROR(handler, msg) |
| #define | LOG_CFATAL(handler, msg) |
◆ FUNCTION_SIGNATURE
| #define FUNCTION_SIGNATURE __func__ |
◆ LOG_CDEBUG
| #define LOG_CDEBUG |
( |
| handler, |
|
|
| msg ) |
Value:
#define LOG_CMSG(handler, level, msg)
Definition Logger.hpp:76
@ DEBUG
Information useful for developers during debugging.
Definition Logger.hpp:14
◆ LOG_CERROR
| #define LOG_CERROR |
( |
| handler, |
|
|
| msg ) |
Value:
@ ERROR
An error that occurred but the application can recover from.
Definition Logger.hpp:17
◆ LOG_CFATAL
| #define LOG_CFATAL |
( |
| handler, |
|
|
| msg ) |
Value:
@ FATAL
A critical error that will likely lead to termination.
Definition Logger.hpp:18
◆ LOG_CINFO
| #define LOG_CINFO |
( |
| handler, |
|
|
| msg ) |
Value:
@ INFO
Informational messages about application progress.
Definition Logger.hpp:15
◆ LOG_CMSG
| #define LOG_CMSG |
( |
| handler, |
|
|
| level, |
|
|
| msg ) |
Value: do { \
LOG_MSG(level, (handler)->getLogSignature() <<
" " <<
FUNCTION_SIGNATURE <<
": " << msg); \
} while (0)
#define FUNCTION_SIGNATURE
Definition Logger.hpp:45
◆ LOG_CTRACE
| #define LOG_CTRACE |
( |
| handler, |
|
|
| msg ) |
Value:
@ TRACE
Fine-grained messages, typically for detailed debugging.
Definition Logger.hpp:13
◆ LOG_CWARN
| #define LOG_CWARN |
( |
| handler, |
|
|
| msg ) |
Value:
@ WARNING
Indicates a potential issue that is not a critical error.
Definition Logger.hpp:16
◆ LOG_DEBUG
Value:
#define LOG_MSG(level, msg)
Base macro. Uses a do-while(0) loop to scope variables and a compile-time 'if' check to strip out low...
Definition Logger.hpp:58
◆ LOG_ERROR
◆ LOG_FATAL
◆ LOG_INFO
◆ LOG_MSG
| #define LOG_MSG |
( |
| level, |
|
|
| msg ) |
Value: do { \
if (level >= utils::LOGLEVEL) { \
std::ostringstream oss; \
oss << msg; \
utils::Logger::log(level, oss.str()); \
} \
} while (0)
Base macro. Uses a do-while(0) loop to scope variables and a compile-time 'if' check to strip out low-level logs.
If 'level' is less than the compiled 'LOGLEVEL', the compiler's optimizer (Dead Code Elimination) will completely remove the 'if' block. This prevents the expensive std::ostringstream construction and message evaluation from ever happening.
◆ LOG_SDEBUG
| #define LOG_SDEBUG |
( |
| msg | ) |
|
Value:
#define LOG_SMSG(level, msg)
Definition Logger.hpp:69
◆ LOG_SERROR
| #define LOG_SERROR |
( |
| msg | ) |
|
◆ LOG_SFATAL
| #define LOG_SFATAL |
( |
| msg | ) |
|
◆ LOG_SINFO
◆ LOG_SMSG
| #define LOG_SMSG |
( |
| level, |
|
|
| msg ) |
◆ LOG_STRACE
| #define LOG_STRACE |
( |
| msg | ) |
|
◆ LOG_SWARN
◆ LOG_TRACE
◆ LOG_WARN
◆ LOGLEVEL