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

RE: logging

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of David Wright

> I'll confess upfront that, despite being a longtime user, I don't
> understand slapd's logging well at all. Maybe I'm just dense, but I think
> the descriptions (in the slapd.conf man page and the Administrator's
> guide) of what each bit in the loglevel does are nearly impenetrible. Can
> anyone clarify...
> 1) What loglevel bits to set in order to record startup info,
> authenticated and anonymouns binds, and shutdown info. This way each bind
> generates 1-2 lines in the log, which seems tollerable.
> 2) What level (INFO, WARN, etc.) does slapd log with? Does it depend on
> the event or is it always the same?
> 3) I have replication working fine, but my replication log is empty. What
> is normally replog'd and how do I make it happen? (Yes, I do specify a
> file using the replog directive.)
> Info from anyone who has a good command of these issues is appreciated.

Picky, picky...

Of course, the current logging mechanism is certainly not in any great
Of the 15 or so bits defined, LDAP_DEBUG_TRACE is used in about 90% of the
debug statements, so it's somewhat difficult in practice to zero in on just
the messages you're interested in.

There is a new logging mechanism being worked on in 2.1 which will break
things up into individual categories/subsystems with separate levels for
each. (The code is already in the 2.1 alpha & beta releases, behind some
#ifdef NEW_LOGGING wrappers. But that code is still being overhauled and
put into shape, so don't try it just yet.)

1) The closest thing would be using LDAP_DEBUG_STATS which will log a
for each request. Unfortunately, this will pick up more than just Binds, and
it goes unconditionally to stderr as opposed to any logfile you may have
configured. It also uses syslog().

2) Currently all messages are syslog'd at the same level. You configure this
with the "loglevel" keyword in slapd.conf. As mentioned above, with the
NEW_LOGGING code each log subsystem gets its own priority level.

3) slurpd always truncates/empties the slapd replog as soon as it reads it.
When slurpd is running correctly the replog should always appear to be zero
length. Since you say that replication is working fine, then all is as it
should be.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support