我们的ActiveMQ日志包含太多条目,类似于此(简化):
2017-03-16 09:58:11,721 | INFO | Adding Connection: ConnectionInfo {...} | org.apache.activemq.broker.util.LoggingBrokerPlugin | ActiveMQ Transport: ...
2017-03-16 09:58:11,724 | INFO | Removing Session: SessionInfo {...} | org.apache.activemq.broker.util.LoggingBrokerPlugin | ActiveMQ Transport: ...
2017-03-16 09:58:11,724 | INFO | Removing Connection: ConnectionInfo {...} | org.apache.activemq.broker.util.LoggingBrokerPlugin | ActiveMQ Transport: ...
2017-03-16 09:58:11,725 | INFO | Adding Connection: ConnectionInfo {...} | org.apache.activemq.broker.util.LoggingBrokerPlugin | ActiveMQ Transport: ...
2017-03-16 09:58:11,725 | INFO | Removing Session: SessionInfo {...} | org.apache.activemq.broker.util.LoggingBrokerPlugin | ActiveMQ Transport: ...
2017-03-16 09:58:11,725 | INFO | Removing Connection: ConnectionInfo {...} | org.apache.activemq.broker.util.LoggingBrokerPlugin | ActiveMQ Transport: ...
实际上,在每一毫秒内,我们都有Adding Connection
,Removing Session
和Removing Connection
三元组。因此,10 * 10 MB的日志文件只包含几分钟的流量,而且实际上没用。
我们使用在JBoss中运行的Java Enterprise应用程序连接到ActiveMQ代理。
感谢您提前提供任何帮助或提示!
答案 0 :(得分:1)
我认为您在activemq.xml中启用了LoggingBrokerPlugin(http://activemq.apache.org/logging-interceptor.html)。
您只需打开logConsumerEvents和logProducerEvents日志,而不是使用logAll。