为 ActiveMQ Artemis 中的特定记录器启用 TRACE

Zig*_*ust 1 activemq-artemis

如何设置logging.properties记录转移artemis.log

我明白TRACE应该用于org.apache.activemq.artemis.core.server.impl.DivertImpl

我该如何设置它etc/logging.properties

Jus*_*ram 5

要启用特定记录器(例如org.apache.activemq.artemis.core.server.impl.DivertImpl),logging.properties您必须首先将记录器添加到loggers文件顶部的列表中。这是添加的默认loggers列表org.apache.activemq.artemis.core.server.impl.DivertImpl

loggers=org.eclipse.jetty,org.jboss.logging,org.apache.activemq.artemis.core.server,org.apache.activemq.artemis.utils,org.apache.activemq.artemis.journal,org.apache.activemq.artemis.jms.server,org.apache.activemq.artemis.integration.bootstrap,org.apache.activemq.audit.base,org.apache.activemq.audit.message,org.apache.activemq.audit.resource,org.apache.activemq.artemis.core.server.impl.DivertImpl
Run Code Online (Sandbox Code Playgroud)

然后您需要将记录器的日志记录级别配置为TRACE,例如:

logger.org.apache.activemq.artemis.core.server.impl.DivertImpl.level=TRACE
Run Code Online (Sandbox Code Playgroud)

最后,您需要更新允许日志记录通过的level必要内容,例如:handlerTRACE

handler.CONSOLE.level=TRACE
Run Code Online (Sandbox Code Playgroud)

或者

handler.FILE.level=TRACE
Run Code Online (Sandbox Code Playgroud)