Active Directory,  Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Windows Server

Mac OS X: Directory Services Debug Log

When you’re trying to troubleshoot issues with Directory Services on Mac OS X sometimes the best thing you can do is put the directoryservices daemon into debug mode. To do so you would use the following command:

killall -USR1 Directory Service

By default errors get trapped into this file:

/Library/Logs/DirectoryService/DirectoryService.error.log

But when in debug mode using -USR1 you can see more specific errors in the /Library/Logs/DirectoryService/DirectoryService.error.log file.  You can then use commands such as tail in conjunction with grep in order to isolate issues to specific strings such as ADPlugin. If you choose to use -USR2 for debugging then the logs will get written into the /var/log/system.log file.
To disable verbose logging you can just restart the Directory Services daemon if you are in -USR1 or if you are using -USR2 debugging information will automatically stop writing to the log after 5 minutes.