Directory service debug logging, Open directory logging – Apple Mac OS X Server (Version 10.6 Snow Leopard) User Manual
Page 186

Syslog Configuration File
The Syslog configuration file can be found at /etc/syslog.conf. Each line has the
following format:
Replace
POSIX path to the log file. You can use asterisks (*) as wildcards. For example, the
setting for the kernel is:
kern.* /var/log/system.log
This shows that all messages to the log of all levels from the kernel are to be written in
the file /var/log/system.log.
Likewise, the following setting is an example of all emergency messages from all
processes being sent to a custom emergencies log file:
*.emerg /var/log/emergencies.log
Directory Service Debug Logging
If you are using Open Directory and you want debugging information from directory
services processes, you must use a different logging method than systemlog. You must
enable debug logging for the process manually. When enabled, this debug logging
writes messages to the log file at:
/Library/Logs/DirectoryService/DirectoryService.debug.log
You must perform the following commands with superuser permissions (sudo or root):
To manually turn on/off debug logging for directory services:
killall -USR1 DirectoryService
To start debugging at startup:
touch /Library/Preferences/DirectoryService/.DSLogAPIAtStart
Note: The debug log is not self-documented and is not intended for normal logging. It
is very verbose and very opaque. It shows API calls, plugin queries, and responses.
Open Directory Logging
The configuration file can be found at /etc/openldap and the logs are found in/var/
log/slapd.log. Each directory transaction generates a separate transaction log in
the OpenLDAP databse. The database and transaction logs can be found at/var/db/
openldap/openldap-data.
The slapd process, which governs Open Directory usage, has an additional parameter
for extra logging. The following command enables the additional logging:
slapconfig -enablesslapdlog
186
Chapter 8
Monitoring Your System