utils/debug.hh File Reference

Debug utilities. More...

#include <iostream>
#include <string.h>

Go to the source code of this file.

Macros

#define VERBOSE
 Verbose flag. Comment to remove debug features. More...
 
#define __FILENAME__   (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
 Current filename macro. More...
 
#define debugPrint(x)
 Print debug information to std::cout. More...
 
#define debugPrintTrace(x)
 Print debug information to std::cout, including current filename, line and function. More...
 
#define errorPrintTrace(x)
 Print debug information to std::cout, including current filename, line and function. More...
 

Detailed Description

Debug utilities.

Author
João Borrego : jsbruglie

Macro Definition Documentation

#define __FILENAME__   (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)

Current filename macro.

#define debugPrint (   x)
Value:
do { \
std::cout << "\033[1;32m" << x; \
} while (0)

Print debug information to std::cout.

#define debugPrintTrace (   x)
Value:
do { \
std::cout << "\033[1;33m" << \
"[Dbg] [" << __FILENAME__ << ":" << __LINE__ << ":" << __func__ << "] " << \
x << "\n";\
} while (0)
#define __FILENAME__
Current filename macro.
Definition: utils/debug.hh:34

Print debug information to std::cout, including current filename, line and function.

#define errorPrintTrace (   x)
Value:
do { \
std::cerr << "\033[1;31m" << \
"[Err] [" << __FILENAME__ << ":" << __LINE__ << ":" << __func__ << "] " << \
x << "\n";\
} while (0)
#define __FILENAME__
Current filename macro.
Definition: utils/debug.hh:34

Print debug information to std::cout, including current filename, line and function.

#define VERBOSE

Verbose flag. Comment to remove debug features.