On 11/23/2015 08:13 AM, Lukas Slebodnik wrote:
On (23/11/15 08:03), Petr Cech wrote:
> On 11/20/2015 12:13 PM, Petr Cech wrote:
>> Hello all,
>>
>> I would like to work on:
>>
https://fedorahosted.org/sssd/ticket/2808
>> However, there are two different opinions.
>>
>> Ticket description says:
>> ........................
>> Currently a log message of SSSD like e.g.
>>
>> # (Mon Jun 29 22:10:59 2015) [sssd[be[lab.runlevelone.lan]]]
>> [be_get_account_info] (0x0200): Got request for [0x1001][1][name=dlavu]
>>
>> has the debug level given by '(0x0200)'. For the inexperienced reader it
>> is hard to see if the message indicates an error or is only some
>> informational messages.
>>
>> It would be good to replace them which short text tags which better
>> indicates the character and severity of the message. E.g. something like
>> ERR_CRIT, INFO_DATA, TRACE_FUNC ...
>> -----
>>
>> Jakub said:
>> One issue that I realized is that we might want to add the string
>> representation in addition to hexa to avoid breaking existing scripts.
>> But on the other hand, I'm not sure if we should care too much about
>> keeping compatibility of debug logs...
>>
>> And Lukas said:
>> I use very often hexadecimal representation for filtering huge log file.
>> So it should not be replaced. It's much simpler (and shorter) to write
>> regex for hexadecimal numbers.
>> -----
>>
>> In my opinion, we should write numerical values if and only if they
>> represent values (uid for example), not enum constant.
>>
>>
>> In this situation I feel that filtering is important.
>> I suggest use:
>> # (Mon Jun 29 22:10:59 2015) [sssd[be[lab.runlevelone.lan]]]
>> [be_get_account_info] (0x0200 | INFO_FUNC_DATA): Got request for
>> [0x1001][1][name=dlavu]
>>
>> What is your opinion, please?
>>
>> Regards
>>
>> Petr
>> _______________________________________________
>> sssd-devel mailing list
>> sssd-devel(a)lists.fedorahosted.org
>>
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org
>>
>
> Hi,
>
> I have one opinion.
>
> I just try to do such text labels:
> SSSDBG_FATAL_FAILURE --> "ERR_FATAL_FAILURE"
> SSSDBG_CRIT_FAILURE --> "ERR_CRIT_FAILURE"
> SSSDBG_OP_FAILURE --> "ERR_OP_FAILURE"
> SSSDBG_MINOR_FAILURE --> "ERR_MINOR_FAILURE"
> SSSDBG_CONF_SETTINGS --> "INFO_CONF_SETTINGS"
> SSSDBG_FUNC_DATA --> "INFO_FUNC_DATA"
> SSSDBG_TRACE_FUNC --> "TRACE_FUNC"
> SSSDBG_TRACE_LIBS --> "TRACE_LIBS"
> SSSDBG_TRACE_INTERNAL --> "TRACE_INTERNAL"
> SSSDBG_TRACE_ALL --> "TRACE_ALL"
> SSSDBG_BE_FO --> "FAIL_OVER"
>
> Isn't this way better?
> SSSDBG_FATAL_FAILURE --> "F4"
> SSSDBG_CRIT_FAILURE --> "F3"
> SSSDBG_OP_FAILURE --> "E3"
> SSSDBG_MINOR_FAILURE --> "W3"
> SSSDBG_CONF_SETTINGS --> "I2"
> SSSDBG_FUNC_DATA --> "I2"
> SSSDBG_TRACE_FUNC --> "T3"
> SSSDBG_TRACE_LIBS --> "T2"
> SSSDBG_TRACE_INTERNAL --> "T1"
> SSSDBG_TRACE_ALL --> "T1"
> SSSDBG_BE_FO --> "E4"
^^
SSSDBG_BE_FO does not mean an error.
>
> I suppose category Fatal, Error, Warning. Trace, Info, each at 4 levels.
No because man sssd.conf says something different about debug levels.
@see man sss.conf -> GENERAL OPTIONS
-> Options usable in all sections
-> debug_level
LS
Hi Lukas,
I am afraid that I have to disagree, Lukas. The idea of ticket #2808 is
make logs more readable for admins. I think it is good idea.
Current example message looks like:
# (Mon Jun 29 22:10:59 2015) [sssd[be[lab.runlevelone.lan]]]
[be_get_account_info] (0x0200): Got request for [0x1001][1][name=dlavu]
In my opinion, it could be:
# (Mon Jun 29 22:10:59 2015) [sssd[be[lab.runlevelone.lan]]]
[be_get_account_info] (0x0200) (I3): Got request for [0x1001][1][name=dlavu]
The information which you mentioned, Lukas, from man sssd.conf, is in
0x0200 and the readability is in I3 (or INFO if you would).
Is it really so bad idea?
Regards
Petr