[RFC PATCHES] Macros for debug levels
cs at samba.org
Tue Jun 9 12:07:00 MDT 2015
On Mon, Jun 08, 2015 at 03:49:30PM +1200, Andrew Bartlett wrote:
> 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.
Fair enough. I will resubmit the patches with an updated commit message.
More information about the samba-technical