Each debug object is associated with one
ostream
. The default debug output macros
Dout and
DoutFatal use the
default debug object
libcwd::libcw_do. Other debug objects may be created as global objects; it is convenient to define new macros for each (custom) debug object using the generic macros
LibcwDout and
LibcwDoutFatal.For example, add something like the following to your own
"debug.h" file:
#ifdef CWDEBUG
#define MyDout(cntrl, data) LibcwDout(DEBUGCHANNELS, my_debug_object, cntrl, data)
#define MyDoutFatal(cntrl, data) LibcwDoutFatal(DEBUGCHANNELS, my_debug_object, cntrl, data)
#else // !CWDEBUG
#define MyDout(a, b)
#define MyDoutFatal(a, b) LibcwDoutFatal(::std,, a, b)
#endif // !CWDEBUG
- See Also
- The Output Device (Debug Object)
-
libcwd::libcw_do