cvs commit: tng/source/include debug.h tng/source/lib debug.c
elrond at samba-tng.org
Mon Jul 15 07:09:07 GMT 2002
Just to add on this.
On Mon, Jul 15, 2002 at 11:28:31AM +1000, Andrew Bartlett wrote:
> > the DEBUG macro has one extra argument - the #define
> > listed in freedce/include/rpcdebug.h.
Take a look at debug.h.
There's DEBUGC(), wnich takes exactly that extra arg.
And DEBUG() can be thought of as
#define DEBUG(x,y) DEBUGC(DBGC_CLASS, x, y)
And DBGC_CLASS can be redefined at the beginning of a .c:
#define DBGC_CLASS DBGC_RPC
And in debug.h, there are already predefined numbers for
some useful stuff.
Actualy, TNG doesn't use dynamic registered classes.
To conclude TNG (and head's) debug.[ch] has nearly
everything, that the others also have, but it it backward
compatible to the old DEBUG() stuff and has strings for the
classes to communicate to the user.
Internally, it uses numbers!
I like it quite.
I use rpcclient -d 'rpc:10' quite often, so I don't see all
that crappy smb stuff.
Since I moved show_msg now into its own file, I can also
disable that by itself: rpcclient -d '10 smb:2'.
10 sets the global debug level, while smb:2 sets the one
for smb back to only 2.
More information about the samba-technical