OpenDJ can write debug information and stack traces to the server debug log. What is logged depends both on debug targets that you create, and also on the debug level that you choose.
Procedure 25.3. To Configure Debug Logging
-
Enable the debug log,
opendj/logs/debug, which is not enabled by default.$ dsconfig set-log-publisher-prop --hostname opendj.example.com --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --publisher-name "File-Based Debug Logger" --set enabled:true --set default-debug-level:all --no-prompt --trustAll
You can set
default-debug-levelto a less verbose level if necessary. -
Create a debug target or targets.
No debug targets are enabled by default.
$ dsconfig list-debug-targets --hostname opendj.example.com --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --publisher-name "File-Based Debug Logger" --no-prompt --trustAll Debug Target : debug-level : debug-category -------------:-------------:--------------- $
A debug target specifies a fully-qualified OpenDJ Java package, class, or method for which to log debug messages at the level you specify.
$ dsconfig create-debug-target --hostname opendj.example.com --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --publisher-name "File-Based Debug Logger" --type generic --target-name org.opends.server.api --set debug-level:all --no-prompt --trustAll
-
Restart OpenDJ to see debug messages in the log.
$ /path/to/opendj/bin/stop-ds --restart ... $ tail -f /path/to/opendj/logs/debug ...
If you have set
debug-level:all, OpenDJ generates a great deal of output in the debug log file. Use debug logging very sparingly on production systems.

