[RFC PATCHES] Macros for debug levels

Andrew Bartlett abartlet at samba.org
Sun Jun 7 21:49:30 MDT 2015

On Fri, 2015-06-05 at 15:35 -0700, Christof Schmitt wrote:
> Looking through the code, it is often not clear what severity or log
> level a certain message should have. Severe errors use level 0, and
> debug messages usually have level 10.
> The attached patches introduce macros for emitting messages that match a
> subset of the syslog priorities. The idea would be that going forward,
> any change to a debug message could also switch to one of these macros.
> Over time, that should give a more consistent usage of debug levels.
> A nice cleanup would also be the removal of one pair of parenthesis.
> What do others think? Would this be worthwhile?

I'm glad to read that "Variadic macros are a new feature in C99".
Sounds like another C99 feature that would be good to embrace.

I'm happy with
"[PATCH 2/2] debug: Adapt mapping to match new log level macros"
as long as you change the commit message to indicate that you are
changing the mapping, that is level 3-5 now become LOG_NOTICE, not
LOG_INFO.  I think that is a reasonable change, but it is a behaviour
change, not a simple adaptation as the commit suggests.

Andrew Bartlett
Andrew Bartlett
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba-technical mailing list