How to enable DEBUG logging for jconsole or jvisualvm
Environment
Red Hat JBoss Enterprise Application Platform
Issue
- How to enable DEBUG logging for jconsole
- How to enable DEBUG logging for jvisualvm
Resolution
Create a Java Util Logging (JUL) logging properties file for jconsole
Example logging-jconsole.properties :
handlers=java.util.logging.ConsoleHandler
.level=INFO
java.util.logging.ConsoleHandler.level=FINEST
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
javax.management.level=FINEST
javax.management.remote.level=FINEST
jconsole.sh -J-Djava.util.logging.config.file=logging-jconsole.properties
For Visual VM, the same logging properties can be used and it can be enabled similarly:
jvisualvm -J-Djava.util.logging.config.file=logging-jconsole.properties
Windows Note
Note there is a bug where the jconsole.bat is not passing the command line arguments to jconsole.exe
See this article for the workaround / fix : jconsole.bat is not passing command line arguments down to jconsole.exe in JBoss EAP 6.4
Attachments
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
