[Date Prev][Date Next]
Re: LDAP Debug messages & severity levels
- To: Hallvard B Furuseth <firstname.lastname@example.org>
- Subject: Re: LDAP Debug messages & severity levels
- From: Pierangelo Masarati <email@example.com>
- Date: Thu, 22 Dec 2005 13:37:42 +0100
- Cc: openldap-devel@OpenLDAP.org
- In-reply-to: <firstname.lastname@example.org>
- References: <email@example.com> <43282C12.firstname.lastname@example.org> <email@example.com>
On Fri, 2005-09-16 at 18:38 +0200, Hallvard B Furuseth wrote:
did you get any far with your logging redesign? I'm asking because
we're currently facing the same problem, and it's getting pretty urgent.
If you already started coding, I'd be happy to jump in and contribute;
otherwise, I'd start a similar activity. In my design, the
infrastructure to support it will be very light; moreover, there will be
no need to change __all__ statements: on the contrary, existing Debug()
statements would just have a neutral, default behavior; this means no
#ifdefs, no NEW_LOGGING style intrusivity and so.
- keep the "loglevel" notion; messages that always have to be logged
will use LDAP_DEBUG_ANY;
- add the "severity" notion, mapped (essentially) 1:1 to syslog's
- old Debug() macros will log for their loglevel and at
ldap_syslog_level, which is now set to LOG_DEBUG but should be
customizable to any of syslog's levels;
- new macros will either allow for severity, or use friendly names like
in your design (I haven't decided yet: naming seems friendly and allows
to change the underlying syslog level, but using LDAP_SYSLOG_* looks
more direct to me).
- the original behavior would be restored by setting all LDAP_SYSLOG_*
macros to LOG_DEBUG.
Since this does not require to change all logging invocations at once, I
think it would easily fit in OpenLDAP 2.3 and get to release way before
transition is all done; there would be no need to hide anything behind
dedicated #ifdefs, because the traditional behavior can be restored
either at configure or even run-time (LDAP_SYSLOG_* can be vars instead
I haven't yet considered the implications of --disable-debug, though.
Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team
Via Dossi, 8 - 27100 Pavia - ITALIA