Many Thanks for the suggestions.
I have one more doubt:
As syslog get rotated automatically, will the ldaplog file will get rotated automatically after specifying the below line in syslog.conf? Or shall I have specify anything to get this log rotation in place.
Local4.debug /var/log/ldap/log
Regards Rahul Manchanda ---------------------------------------------------------------------------------------------------------- Andes , Selfcare Platform Build Team tel: (+91) (20) 66018100 extn: 6178; e-mail: rahul.manchanda@bt.com Address: Tech Mahindra, Sharada Center, Erandwana Pune-4
-----Original Message----- From: Buchan Milne [mailto:bgmilne@staff.telkomsa.net] Sent: Thursday, April 22, 2010 9:08 AM To: openldap-technical@openldap.org Cc: Manchanda,RK,Rahul,DKE C Subject: Re: Implementing LDAP logging
On Wednesday, 21 April 2010 16:27:36 rahul.manchanda@bt.com wrote:
Adding to the below I didn't compiled the LDAP with --enable-debug during configuration time. Is that the reason it is not logging to the logfile I mentioned in the ldap configuration?
For "normal" logging, you need to consider the syslog aspect.
This is the way I am specifying the logging info in the slapd.conf:
loglevel sync stats
This configures what gets logged to syslog. How syslog deals with it is up to your syslog configuration.
logfile /opt/software/openldap2.4.19/etc/openldap/logs/ldaplog-primary.log
$ PAGER=cat man slapd.conf|grep -A4 "logfile <" logfile <filename> Specify a file for recording debug log messages. By default these messages only go to stderr and are not recorded anywhere else. Specifying a logfile copies messages to both stderr and the logfile.
I believe this is only for use with the -d flag to slapd.
From: Manchanda,RK,Rahul,DKE C Sent: Wednesday, April 21, 2010 3:03 PM To: openldap-technical@openldap.org Cc: Manchanda,RK,Rahul,DKE C Subject: Implementing LDAP logging
Hi All,
Even on specifying the loglevel and logfile directives in the slapd.conf ldap related logs are not being written to the file.
However separate auditlog file is getting created successfully and all the update/delete/modify/insert operations are getting recorded successfully over there.
I need to get the ldap related log file created as well but that is something not happening. Also tried specifying the LOCAL4 feature in the syslog.conf and restarted the system logging service but no luck with that as well.
What is your slapd command-line? LOCAL4 is the default facility. Does the directory that should hold the log file you specified in syslog.conf exist? Can you provide the relevant parts of your syslog.conf?
Regards, Buchan