Skip to content

Commit

Permalink
Fixing log code
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Aug 15, 2024
1 parent 044758c commit 73ac471
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/wrench/logging/TerminalOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,30 @@ class ObjectTracker {
namespace wrench {


/* Wrappers around XBT_* macros, using a bit of those macro's internal magic as well
/* Wrappers around XBT_* macros, using a bit of those macro's internal magic as well
* to avoid generating useless (but space consuming) color ASCII codes
*/

#define WRENCH_LOG_CATEGORY(cname, desc) XBT_LOG_NEW_DEFAULT_CATEGORY(cname, desc)

#define WRENCH_INFO(...) \
if (_XBT_LOG_ISENABLEDV((*_simgrid_log_category__default), xbt_log_priority_info)) { \
if (_XBT_LOG_ISENABLEDV((*_misuse_of_XBT_LOG_macros_detected__default), xbt_log_priority_info)) { \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_INFO(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
} \
static_assert(true, "")

#define WRENCH_DEBUG(...) \
if (_XBT_LOG_ISENABLEDV((*_simgrid_log_category__default), xbt_log_priority_debug)) { \
if (_XBT_LOG_ISENABLEDV((*_misuse_of_XBT_LOG_macros_detected__default), xbt_log_priority_debug)) { \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_DEBUG(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
} \
static_assert(true, "")

#define WRENCH_WARN(...) \
if (_XBT_LOG_ISENABLEDV((*_simgrid_log_category__default), xbt_log_priority_warning)) { \
if (_XBT_LOG_ISENABLEDV((*_misuse_of_XBT_LOG_macros_detected__default), xbt_log_priority_warning)) { \
wrench::TerminalOutput::beginThisProcessColor(); \
XBT_WARN(__VA_ARGS__); \
wrench::TerminalOutput::endThisProcessColor(); \
Expand Down

0 comments on commit 73ac471

Please sign in to comment.