On Sun, Dec 22, 2013 at 11:23:58AM +0200, Nikolai Kondrashov wrote:
On 12/21/2013 08:47 PM, Lukas Slebodnik wrote:
>On (20/12/13 18:15), Nikolai Kondrashov wrote:
>>Hi everyone,
>>
>>Please find attached the third version of the DEBUG macro refactoring
>>patchset. The second version was lost to the maillist message size limit, so
>>I'll list the changes from the first one:
>>
>> * level limiting condition moved to the macro as requested by Simo,
>> * macro definition update is separated from the invocation update,
>> * automatic macro invocation update is separated from the following manual
>> fixups,
>> * invocations using the old debug level (number literals) are updated to
>> use the new bitmask macros,
>I am not really sure, whether we need to convert old debug levels to new debug
>levels with script.
>
>I don't remember what was the result in previous thread.
>Let's discuss about this point one more time.
>
>When I replaced some debug levels in the past, I had to change level,
>because it didn't fit the description from manual pages.
>
>man sssd.conf
> -> SERVICES SECTIONS
> -> General service configuration options
> -> debug_level
>
>I can see two options
>1. change debug level with Nikolai's script
> and occasionally update debug levels to the proper level
>2. Push patches without this part
> and continue with occasionally conversions
The first option is better for the following reasons:
I mostly agree with Lukas, but per conversation on #sssd the other
developers preferred to mass-change the debug logs and I don't want to
block the patches because of this.
1. There are 2273 uses of the old levels, *half* of all DEBUG macro
invocations, so updating them on occasion will take a *long* time.
2. Code is more often read than written (modified), and all this time
developers will be reading code using obscure numeric literals, which
take additional mental hop (effort) to comprehend.
3. Spotting incorrect debug level will be easier with symbolic levels
instead of numeric ones and thus they're more likely to be corrected.
Sorry, I disagree about 2) and 3). Maybe it's just how I work, but I've
trained myself to convert any numeric constants I see in the code and
just skip the SSSDBG_ unless I'm also touching the DEBUG macro for other
reasons.