logger
Macros
macros.hpp File Reference

Debugging macros. More...

Go to the source code of this file.

Macros

#define DEBUG_EXPR(expression)   logger::debug("DEBUG_EXPR") << #expression << " (" << __FILE__ << ":" << __LINE__ << ")";expression;
 Logs an expression, alongside the source file and line, and executes it afterwards. Use this for tracing execution progress. More...
 
#define DEBUG_VAL(value)   logger::debug("DEBUG_VAL") << #value << " = " << (value);
 Logs the name and value of a given variable or expression. Use this debugging variable values. More...
 

Detailed Description

Debugging macros.

This header contains helper macros for easier debugging.

Macro Definition Documentation

◆ DEBUG_EXPR

#define DEBUG_EXPR (   expression)    logger::debug("DEBUG_EXPR") << #expression << " (" << __FILE__ << ":" << __LINE__ << ")";expression;

Logs an expression, alongside the source file and line, and executes it afterwards. Use this for tracing execution progress.

Parameters
expressionThe expression to be logged.

◆ DEBUG_VAL

#define DEBUG_VAL (   value)    logger::debug("DEBUG_VAL") << #value << " = " << (value);

Logs the name and value of a given variable or expression. Use this debugging variable values.

Parameters
valueA variable or simple expression.