[Samba] Re: Log level and debug classes

Igor Belyi sambauser at katehok.ac93.org
Wed Sep 22 12:57:36 GMT 2004


Marco De Vitis wrote:
> How can I know the names of all debug classes available, what they refer
> to, and the effect of log levels on them?

 From source/include/debug.h:
  /*
  * Define all new debug classes here. A class is represented by an entry in
  * the DEBUGLEVEL_CLASS array. Index zero of this arrray is equivalent 
to the
  * old DEBUGLEVEL. Any source file that does NOT add the following lines:
  *
  *   #undef  DBGC_CLASS
  *   #define DBGC_CLASS DBGC_<your class name here>
  *
  * at the start of the file (after #include "includes.h") will default to
  * using index zero, so it will behaive just like it always has.
  */
#define DBGC_ALL                0 /* index equivalent to DEBUGLEVEL */
#define DBGC_TDB                1
....
#define DBGC_ACLS               15

 From source/lib/debug.c:
static const char *default_classname_table[] = {
         "all",               /* DBGC_ALL; index refs traditional 
DEBUGLEVEL */
         "tdb",               /* DBGC_TDB          */
....
         "acls",              /* DBGC_ACLS         */
         NULL
};


> My aim is to increase logs regarding file/dir access (e.g. log level = 2
> doesn't log creation/deletion of an empty dir, not even when using the
> extd_audit VFS module), without having too much useless debug info inside
> logs.

I don't know the answer to that but what I would do - I would turn all 
trace on and look which file reports the information I'm intereted in. 
Then look what debug class is defined for this file and what debug level 
turns the message on.

Hope it helps,
Igor



More information about the samba mailing list