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?
This is the way I am specifying the logging info in the slapd.conf:
loglevel sync stats
logfile /opt/software/openldap2.4.19/etc/openldap/logs/ldaplog-primary.log
Please suggest.
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
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.
I don't want to put the logging options in the ldap start up command line argument but want the log file created from configuration itself.
Can someone please suggest on this and also is there a way to implement log rotation for the ldap log file through configuration itself then that will be really helpful.
Many Thanks in advance.
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
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
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
On Thursday, 22 April 2010 09:39:01 rahul.manchanda@bt.com wrote:
Many Thanks for the suggestions.
I have one more doubt:
As syslog get rotated automatically,
?
Not all syslog implementations automatically rotate files. You haven't specified which one you are using ...
will the ldaplog file will get rotated automatically after specifying the below line in syslog.conf?
Probably not.
Or shall I have specify anything to get this log rotation in place.
How are your other logs rotated? By logrotate (e.g. see /etc/logrotate.d)? If so, you should ensure that your logrotate utility is configured to rotate this log as well.
However, this doesn't really have anything to do with OpenLDAP per se.
Local4.debug /var/log/ldap/log
Regards, Buchan
Thanks for the reply.
I think for log rotation we need to specify the rotation policies for ldaplog file in /etc/logadm.conf.
I am currently trying this out and if it worked then will let you know.
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: openldap-technical-bounces+rahul.manchanda=bt.com@OpenLDAP.org [mailto:openldap-technical-bounces+rahul.manchanda=bt.com@OpenLDAP.org] On Behalf Of Buchan Milne Sent: Thursday, April 22, 2010 10:01 AM To: Manchanda,RK,Rahul,DKE C Cc: openldap-technical@openldap.org Subject: Re: Implementing LDAP logging
On Thursday, 22 April 2010 09:39:01 rahul.manchanda@bt.com wrote:
Many Thanks for the suggestions.
I have one more doubt:
As syslog get rotated automatically,
?
Not all syslog implementations automatically rotate files. You haven't specified which one you are using ...
will the ldaplog file will get rotated automatically after specifying the below line in syslog.conf?
Probably not.
Or shall I have specify anything to get this log rotation in place.
How are your other logs rotated? By logrotate (e.g. see /etc/logrotate.d)? If so, you should ensure that your logrotate utility is configured to rotate this log as well.
However, this doesn't really have anything to do with OpenLDAP per se.
Local4.debug /var/log/ldap/log
Regards, Buchan
openldap-technical@openldap.org