10 #ifndef WRENCH_S4U_COLORLOGGING_H 11 #define WRENCH_S4U_COLORLOGGING_H 15 #include <simgrid/s4u/Actor.hpp> 27 #define WRENCH_LOG_NEW_DEFAULT_CATEGORY(cname, desc) XBT_LOG_NEW_DEFAULT_CATEGORY(cname, desc) 29 #define WRENCH_INFO(...); \ 30 if (_XBT_LOG_ISENABLEDV((*_simgrid_log_category__default), xbt_log_priority_info)) { \ 31 wrench::TerminalOutput::beginThisProcessColor(); \ 32 XBT_INFO(__VA_ARGS__) ; \ 33 wrench::TerminalOutput::endThisProcessColor(); \ 36 #define WRENCH_DEBUG(...); \ 37 if (_XBT_LOG_ISENABLEDV((*_simgrid_log_category__default), xbt_log_priority_debug)) { \ 38 wrench::TerminalOutput::beginThisProcessColor(); \ 39 XBT_DEBUG(__VA_ARGS__) ; \ 40 wrench::TerminalOutput::endThisProcessColor(); \ 43 #define WRENCH_WARN(...); \ 44 if (_XBT_LOG_ISENABLEDV((*_simgrid_log_category__default), xbt_log_priority_warning)) { \ 45 wrench::TerminalOutput::beginThisProcessColor(); \ 46 XBT_WARN(__VA_ARGS__) ; \ 47 wrench::TerminalOutput::endThisProcessColor(); \ 89 static void beginThisProcessColor();
91 static void endThisProcessColor();
93 static void disableColor();
94 static void disableLog();
102 static const char * color_codes[];
104 static std::map<simgrid::s4u::Actor *, std::string> colormap;
106 static std::string getThisProcessLoggingColor();
108 static bool color_enabled;
109 static bool wrench_no_log;
119 #endif //WRENCH_S4U_COLORLOGGING_H Green text.
Definition: TerminalOutput.h:68
static void setThisProcessLoggingColor(Color color)
Set the color of log messages printed to the terminal.
Definition: TerminalOutput.cpp:37
Red text.
Definition: TerminalOutput.h:66
Blue text.
Definition: TerminalOutput.h:72
White text.
Definition: TerminalOutput.h:78
Color
Terminal output color enum.
Definition: TerminalOutput.h:62
Black text.
Definition: TerminalOutput.h:64
Yellow text.
Definition: TerminalOutput.h:70
Color-enabling wrappers around Simgrid's XBT_INFO, XBT_DEBUG, XBT_WARN logging macros.
Definition: TerminalOutput.h:57
Cyan text.
Definition: TerminalOutput.h:76
Magenta text.
Definition: TerminalOutput.h:74