20 #ifndef ESSENTIA_DEBUGGING_H
21 #define ESSENTIA_DEBUGGING_H
135 void info(
const std::string& msg);
146 #if DEBUGGING_ENABLED
148 # define E_DEBUG_INDENT debugIndentLevel++
149 # define E_DEBUG_OUTDENT debugIndentLevel--
151 # define E_ACTIVE(module) ((module) & activatedDebugLevels)
152 # define E_STRINGIFY(msg) (Stringifier() << msg).str()
156 # define E_DEBUG_NONL(module, msg) if (E_ACTIVE(module)) loggerInstance.debug(module, E_STRINGIFY(msg), false)
157 # define E_DEBUG(module, msg) if (E_ACTIVE(module)) loggerInstance.debug(module, E_STRINGIFY(msg << '\n'), true)
160 # define ALGONAME _name << std::string((std::max)(15-(int)_name.size(), 0), ' ') << ": "
161 # define EXEC_DEBUG(msg) E_DEBUG(EExecution, ALGONAME << nProcess << " - " << msg)
163 # define E_INFO(msg) loggerInstance.info(E_STRINGIFY(msg))
164 # define E_WARNING(msg) loggerInstance.warning(E_STRINGIFY(msg))
165 # define E_ERROR(msg) loggerInstance.error(E_STRINGIFY(msg))
169 # define E_DEBUG_INDENT
170 # define E_DEBUG_OUTDENT
171 # define E_ACTIVE(module) false
172 # define E_STRINGIFY(msg) ""
173 # define E_DEBUG_NONL(module, msg)
174 # define E_DEBUG(module, msg)
176 # define EXEC_DEBUG(msg)
178 # define E_WARNING(msg)
179 # define E_ERROR(msg)
Definition: debugging.h:110
void error(const std::string &msg)
std::string YELLOW_FONT
Definition: debugging.h:118
Logger()
Definition: debugging.h:123
void debug(DebuggingModule module, const std::string &msg, bool resetHeader=false)
std::string GREEN_FONT
Definition: debugging.h:117
void warning(const std::string &msg)
bool _addHeader
Definition: debugging.h:113
std::string RESET_FONT
Definition: debugging.h:120
std::deque< std::string > _msgQueue
Definition: debugging.h:112
void info(const std::string &msg)
std::string RED_FONT
Definition: debugging.h:119
Definition: algorithm.h:28
const char * debugModuleDescription(DebuggingModule module)
void setDebugLevelForTimeIndex(int index)
std::vector< std::pair< std::pair< int, int >, int > > DebuggingScheduleVector
Definition: debugging.h:85
void unsetDebugLevel(int levels)
void scheduleDebug(DebuggingSchedule schedule, int nentries)
int DebuggingSchedule[][3]
Definition: debugging.h:84
void restoreDebugLevels()
DebuggingModule
Definition: debugging.h:40
@ EExecution
Definition: debugging.h:47
@ EMemory
Definition: debugging.h:48
@ EFactory
Definition: debugging.h:44
@ EConnectors
Definition: debugging.h:43
@ EPyBindings
Definition: debugging.h:52
@ ENone
Definition: debugging.h:58
@ EUnittest
Definition: debugging.h:53
@ ENetwork
Definition: debugging.h:45
@ EAll
Definition: debugging.h:59
@ EUser1
Definition: debugging.h:55
@ EPython
Definition: debugging.h:51
@ EAlgorithm
Definition: debugging.h:42
@ EScheduler
Definition: debugging.h:49
@ EUser2
Definition: debugging.h:56
@ EGraph
Definition: debugging.h:46
void setDebugLevel(int levels)