Reconciling DEBUG in Samba 3 and Samba 4: Debug classes?

Herb Lewis hlewis at
Thu Sep 25 22:43:08 GMT 2008

dropping the debug classes would be OK if we had a consistent set
of rules for which debug level to use for various type messages.
currently we tend to just have to set it to level 10 so we get
everything. It might be nice to even define the debug level to be
a bitmask so we could turn on only function entry debug statements,
or only some other thing of interest without getting everything else.

Gerald (Jerry) Carter wrote:
> Hash: SHA1
> Jelmer Vernooij wrote:
>>Samba 3 and Samba 4 both have different implementations of DEBUG. This
>>is problematic when sharing object files because both DEBUG macros use
>>different helper functions that are not provided by the other Samba. 
>>It would be nice if we could get both Samba's to use the same DEBUG()
>>implementation. The main difference between the current implementations
>>is that Samba 3 supports debug classes. The advantage of this is that
>>it's possible to have a different debug level set for different parts of
>>the code, the disadvantage is that it makes the DEBUG() macro and the
>>code it generates (horribly?) complex. 
>>Are people using DEBUG classes? Should we keep them around? Or should we
>>go with the simple DEBUG() from Samba 4?
> I'd be willing to drpo the classes as I don't think they are that
> helpful at the moment and not really honored by developers.  Interaction
> between various classes (maybe you need idmap and winbindd debug logs)
> means that it is easy to get a sparse debug log that contains
> insufficient information.
> cheers, jerry
> - --
> =====================================================================
> Samba                                    -------
> Likewise Software          ---------
> "What man is a man who does not make the world better?"      --Balian
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> 5AHzRkRhv/5d4qLfgsKLYqo=
> =JL6t

More information about the samba-technical mailing list