FUNC(fname) dumps the function name. RETURN prints that the function named by __func__ is returning This macro MUST appear within braces if used after "if", "else", "while", etc.
DBG(arg) prints line & file and the message arg if __func__ appears in the debug environment variable. The argument must be the innermost part of legit C++ print statement, and it works ONLY in C++ sources.
Example :
returntype proc(args) { FUNC(proc); ....body... DBG( << "message" << value << "more message"; if(test) { cerr << "xyz"; } cerr ) ....more body... if(predicate) { RETURN value; } }
FUNC, and RETURN macros' definitions depend on how the storage manager is configured. They don't do a lot unless configured with --enable-trace
Definition in file w_debug.h.
Go to the source code of this file.
Classes | |
class | w_debug |
An ErrLog used for tracing (configure --enable-trace). More... | |
Defines | |
#define | FUNC(fn) |
#define | RETURN return |
#define | DBG(a) |
#define | DBGTHRD(arg) DBG(<<" th."<<sthread_t::me()->id << " " arg) |
Typedefs | |
typedef ios::fmtflags | w_dbg_fmtflags |