activemq-users mailing list archives

Re: How to log all incoming msgs of Queue "hello" into a separate logfile?

Date

Tue, 20 Mar 2012 09:24:35 GMT

Hi,
I don't think you can configure the logging plugin to only log msgs sent to a certain destination
into a separate log file.
However you can configure log4j so that all output from the logging plugin goes into a separate
log file.
E.g. add the following configuration to your conf/log4j.properties file
################
# Logging Plugin
################
log4j.additivity.org.apache.activemq.broker.util.LoggingBrokerPlugin=false
log4j.logger.org.apache.activemq.broker.util.LoggingBrokerPlugin=INFO, logger
log4j.appender.logger=org.apache.log4j.RollingFileAppender
log4j.appender.logger.file=${activemq.base}/data/logger.log
log4j.appender.logger.maxFileSize=1024KB
log4j.appender.logger.maxBackupIndex=5
log4j.appender.logger.append=true
log4j.appender.logger.layout=org.apache.log4j.PatternLayout
log4j.appender.logger.layout.ConversionPattern=%d %-5p | %m | %t%n
All data logged by the logging plugin will then go into data/logger.log file.
Hope this helps.
Torsten
On Mar 20, 2012, at 8:29 AM, Ben Stover wrote:
> How can I log all incoming msgs in Queue "hello" into a separate logfile
>
> D:\dev\activemq\hello.log
>
> As far as I understand I have to active logging at first according to the Logging Interceptor
described here:
>
> http://activemq.apache.org/logging-interceptor.html
>
> Ok, I specify:
>
> ...
> <loggingBrokerPlugin logConsumerEvents="true"/>
> ....
>
> But how to I restrict the logging to Queue "hello"?
>
> How do I specify a special logfile for this?
>
> Ben
>
>
>
>
>
Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com