ZNC  trunk
Classes | Macros
ZNCDebug.h File Reference
#include <znc/zncconfig.h>
#include <znc/ZNCString.h>
#include <sstream>
+ Include dependency graph for ZNCDebug.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CDebug
 
class  CDebugStream
 

Macros

#define DEBUG(f)
 Output a debug info if debugging is enabled. More...
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG (   f)
Value:
do { \
if (CDebug::Debug()) { \
CDebugStream sDebug; \
sDebug << f; \
} \
} while (0)
static bool Debug()
Definition: ZNCDebug.h:48

Output a debug info if debugging is enabled.

If ZNC was compiled with –enable-debug or was started with –debug, the given argument will be sent to stdout.

You can use all the features of C++ streams:

DEBUG("I had " << errors << " errors");
#define DEBUG(f)
Output a debug info if debugging is enabled.
Definition: ZNCDebug.h:35
Parameters
fThe expression you want to display.