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

Re: LDAP logging question



Joao wrote:
Hello
Is there any chance of logging LDAP not using the syslog??????my problem is, i have more then 1 ldap server in the computer and want to have separated logs of each server.


thnx



Yep, a much better solution than using syslog is to use Daemontools:

	http://cr.yp.to/daemontools.html


You can setup as many slapd instances as you like, each going to their own log directory, e.g. /var/multilog/slapd1, /var/multilog/slapd2, etc...



Here is I run OL under Daemontools (supervise):

# cat /service/slapd/run

#!/bin/sh
# sshd/run
# daemontools run script for slapd service
# ** "foreground" version **
exec 2>&1
echo "*** Starting slapd..."
exec \
    /usr/local/libexec/slapd \
    -d 256 \
    -f /etc/openldap/slapd.conf



# cat /service/slapd/log/run

#!/bin/sh
exec \
setuidgid multilog \
envdir ./env \
sh -c '
    exec \
    multilog \
        t \
        ${MAXFILESIZE+"s$MAXFILESIZE"} \
        ${MAXLOGFILES+"n$MAXLOGFILES"} \
        ${PROCESSOR+"!$PROCESSOR"} \
        /var/multilog/slapd


Be sure to create /var/multilog/slapd and

 `chown -R multilog:nobody /var/multilog'

Assuming you use multilog as the logging user, and nobody as his group.


BR, -- mike