Syslog Configuration File
The Syslog configuration file can be found at /etc/syslog.conf. Each line has the following format:
<facility>.<loglevel> <path to logfile>
Replace <facility> with the process name writing to the log. The path is the standard 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
To start debugging at startup:
touch /Library/Preferences/DirectoryService/.DSLogAPIAtStart
Note: The debug log is not
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/
The slapd process, which governs Open Directory usage, has an additional parameter for extra logging. The following command enables the additional logging:
slapconfig
186
Chapter 8 Monitoring Your System