[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5067) olcLogLevel value is incorrect

Quanah Gibson-Mount wrote:
> --On Tuesday, July 31, 2007 4:35 AM +0000 ando@sys-net.it wrote:
>> quanah@zimbra.com wrote:
>>> Full_Name: Quanah Gibson-Mount
>>> Version: 2.3.37
>>> OS: NA
>>> URL: ftp://ftp.openldap.org/incoming/
>>> Submission from: (NULL) (
>>> When using cn=config with a slapd.conf driven slapd, the value for
>>> olcLogLevel is not correct:
>>> ldapsearch -LLL -x -h build -b "cn=config" -s base -D "cn=config" -W
>>> olcLogLevel
>>> Enter LDAP Password:
>>> dn: cn=config
>>> olcLogLevel: None
>>> However:
>>> grep loglevel conf/slapd.conf
>>> loglevel 32768
>>> And the logging that is happening is actually for level 32768.
>>> Modifying the loglevel works, and once that is done, the right loglevel
>>> is shown.  However, this makes it impossible to know what loglevel is
>>> set via a remote query unless it has been changed.
>>> From slapd.conf(5), loglevel:
>>                 32768  (0x8000  none)  only  messages  that  get logged
>>                        whatever log level is set
>> Seems to be correct.
> Yet if I modify it to be "256", then olcLogLevel is "256".  If I modify
> it to be "32768", then it is "32768".  

That's because in EMIT the loglevel goes through loglevel2bvarray(),
which turns the level into an array of pretty values.  You're supposed
to modify the loglevel by adding multiple values, each with the
descriptive name of the level you're using.  The use of loglevel with
OR'ed integers is stylistically deprecated.

> So if the loglevel setting in
> slapd.conf is "32768", then that is what it should match.  In any case,
> "None" has the unfortunate ring of sounding like an unset value.

In LDAP, if the value were unset, the attribute would be missing, which
is what you get if, for example, you set loglevel to 0.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it