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

Re: Global configuration directive 'logfile'

After some experimentation it would seem that slapd only sends output to your configured logfile when you invoke slapd with the -d option to set your loglevel. Setting a loglevel using the configuration directive does not cause output to be sent to your logfile.

Interestingly enough if you do use the logfile directive and the file does not exist slapd will create it (even if you don't use the slapd -d option). But unless you use the -d command-line option on slapd, nothing will be written to it.

On Wed, Mar 30, 2011 at 4:16 PM, Mark <mah042@gmail.com> wrote:
I've been trying to get the 'logfile' configuration attribute (man5/slapd.conf.5) working but can't seem to. The relevant slapd.conf entries before I define my backend look like:

loglevel stats sync
logfile /tmp/openldap/var/log/slapd.log

and the file exists before I start slapd:

$ ls -l /tmp/openldap/var/log/slapd.log
-rw-r--r--Â 1 me mygrp 0 Mar 30 15:58 /tmp/openldap/var/log/slapd.log

SLAPD runs fine dumping information into syslog but my logfile stays zero length. How can I get my logfile to get written to also?

Thank you,

My setup:

RedHat Enerprise Linux 4.7 (Linux host 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:46:26 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux)
OpenLDAP 2.4.25
BerkeleyDB 4.8.30
OpenSSL 1.0.0d
Cyrus SASL 2.1.23

configured thusly:

ÂÂÂ PATH="/tmp/openldap/bin:${PATH}"; export PATH
ÂÂÂ echo "##BEG `date '+%Y/%m/%d %H:%M:%S'` - configure"

ÂÂÂ CPPFLAGS="-I/tmp/openldap/include" \
ÂÂÂ LDFLAGS="-L/tmp/openldap/lib -R/tmp/openldap/lib" \
ÂÂÂ ./configure \
ÂÂÂÂÂÂÂ --without-subdir \
ÂÂÂÂÂÂÂ --enable-slapd \
ÂÂÂÂÂÂÂÂÂÂÂ --enable-modules \
ÂÂÂÂÂÂÂÂÂÂÂ --enable-wrappers \
ÂÂÂÂÂÂÂ --enable-backends=mod \
ÂÂÂÂÂÂÂÂÂÂÂ --disable-sql \
ÂÂÂÂÂÂÂÂÂÂÂ --disable-ndb \
ÂÂÂÂÂÂÂ --enable-overlays=mod \
ÂÂÂÂÂÂÂ --enable-debug \
ÂÂÂÂÂÂÂ --prefix=/tmp/openldap
ÂÂÂ echo "##END `date '+%Y/%m/%d %H:%M:%S'` - configure"

compiled and installed in /tmp/openldap

$ file /tmp/openldap/libexec/slapd
/tmp/openldap/libexec/slapd: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped