注: ActiveMQ 的版本为: apache-activemq-5.12.0
Linux 系统为: CentOS 6.2
一. 在当前 ActiveMQ 配置下,为了从控制台和后台明确看到每一条消息收发情况,并且在日志中记录消息详情,
这一功能的实现是依赖器插件 Logging Interceptor 实现的.
1.具体操作:
1).在 apache-activemq-5.12.0/conf 目录下的 activemq.xml 文件中添加 <loggingBrokerPlugin> 标签
(注:需要添加在<systeUsage> 标签之前)
<plugins>
<loggingBrokerPlugin logProducerEvents="true" logConsumerEvents="true"/>
</plugins>
2).重启 ActiveMQ 服务器.
二.为了让 ActiveMQ 日志文件输出更多的日志信息,在 /conf/log4j.properties 文件中使用 DEBUG 模式日志输出:
添加以下属性值:
log4j.logger.org.apache.activemq.broker.TransportConnection=DEBUG