简体   繁体   中英

ActiveMQ Artemis: Change log level online

Is there any way to change the ActiveMQ Artemis logging configuration online? Sometimes it is helpful to increase the level to TRACE or DEBUG without restarting the broker instance.

You can use the java.util.logging:type=Logging MBean to inspect and change the level of individual loggers. The ActiveMQ Artemis web console exposes this via the "JMX" tab, eg:

日志配置

Keep in mind:

  • This won't change the level of the relevant handlers in your etc/logging.properties so if you set a logging to TRACE but the level for the handler is only DEBUG then you'll only get DEBUG logging.
  • These changes are volatile . As soon as the broker is restarted the changes will be lost.

Lastly, it's worth noting that by default changes in etc/logging.properties are picked up dynamically by the broker at runtime so if you have access to that file it might be a better option to change it directly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM