We use [slf4j] to log information in the broker client and the broker itself so you can fully configure which logging levels are used and whether to log to files or the console etc. For more information see the log4j manual..
You can disable the ActiveMQ logging by editing the conf/log4j.properties file to disable all INFO level logging for activemq by adding this line
or to disable stdout logging all together change this line
The default logging level in ActiveMQ is INFO. This can be seen by starting up the default ActiveMQ binary in a terminal. In doing so, you will see the output shown below:
But stopping ActiveMQ to change the logging level is not always feasible. There are many cases where the logging level and other configuration details may need to be changed at runtime. Using a JMX tool such as jconsole, the logging configuration file can be changed and reloaded without shutting down ActiveMQ.
To change the ActiveMQ logging level from INFO to DEBUG while ActiveMQ is running, start up jconsole, point to the ActiveMQ instance and navigate to the Broker object's Operations tab as shown below:
To enable debug level logging in ActiveMQ, edit the conf/log4j.properties file that is part of the ActiveMQ binary distribution to disable INFO level logging and enable DEBUG level logging from this:
Notice that the line log4j.rootLogger=INFO, stdout, out has been commented out and the line log4j.rootLogger=DEBUG, out, stdout has been uncommented. Save this change and then, in jconsole, click the button named reloadLog4jProperties as shown below:
After clicking the reloadLog4jProperties button, the dialog pops up stating, 'Method successfully invoked'. This just lets you know that the reloadLog4jProperties method was invoked to reload the conf/log4j.properties file. Now notice in the terminal where ActiveMQ is running that the logging that is being output is now DEBUG:
Disabling DEBUG level logging and enabling INFO level logging is done by editing the log4j.properties file and clicking the reloadLog4jProperties button again.