This is really down to log4j configuration.

## Be sure that ActiveMQ messages are not logged to 'jms' appender
log4j.logger.org.apache.activemq=INFO, STDOUT

should do it, unless it is picking up appenders from the rootlogger.

The problem is if any logging is produced during ActiveMQ connection
creation as part of the JMS appender, It cannot be written as there is a
lock pending appender initialization. Reducing ActiveMQ logging to FATAL
should ensure there is no such logging.

I wonder would the following help, restrict logging level more:
log4j.logger.org.apache.activemq=FATAL, STDOUT

or try and apply filter to *all* appenders:
log4j.logger.org.apache.activemq=INFO


On 11 February 2010 15:20, fehm <felix....@cern.ch> wrote:

>
> Hi,
>
> although this topic seems to be outdated and I have read the documentation
> :
> is there a solution/hint to this issue ?
>
> Unfortunately, I'm experiencing the same with the following log4j config :
>
> laser.conversion.pattern=%d{HH:mm:ss} [%-20t] %-5p %-20c{1} ==> %m%n
> # two appenders have been configured : stdout and rolling file
> log4j.rootLogger=INFO, STDOUT, ROLLING, jms
>
> ## Be sure that ActiveMQ messages are not logged to 'jms' appender
> log4j.logger.org.apache.activemq=INFO, STDOUT
>
> #
> # ROLLING file appender
> #
> log4j.appender.ROLLING=org.apache.log4j.RollingFileAppender
> log4j.appender.ROLLING.File=jdaemon.log
> log4j.appender.ROLLING.MaxFileSize=2MB
> log4j.appender.ROLLING.MaxBackupIndex=10
> log4j.appender.ROLLING.layout=org.apache.log4j.PatternLayout
> log4j.appender.ROLLING.layout.ConversionPattern=${laser.conversion.pattern}
> log4j.appender.ROLLING.Threshold=DEBUG
>
> #
> # Stdout appender
> #
> log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
> log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
> log4j.appender.STDOUT.layout.ConversionPattern=${laser.conversion.pattern}
> log4j.appender.STDOUT.Threshold=DEBUG
>
> #
> # JMS appender
> #
> log4j.appender.jms=org.apache.log4j.net.JMSAppender
> # log4j.appender.jms.layout=org.apache.log4j.HTMLLayout
> # log4j.appender.jms.layout.ConversionPattern=${laser.conversion.pattern}
>
> log4j.appender.jms.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
> log4j.appender.jms.ProviderURL=tcp://cs-ccr-spsea2:61670
> log4j.appender.jms.TopicBindingName=logTopic
> log4j.appender.jms.TopicConnectionFactoryBindingName=ConnectionFactory
>
> also, the jndi.properties file is stated with -D options containing this :
>
> topic.logTopic=logTopic
>
>
> I'd appreciate any help on this !
>
> Cheers,
> Felix
>
> -----
> Felix Ehm,
> www.cern.ch
> --
> View this message in context:
> http://old.nabble.com/Log4J-ActiveMQ-JMS-Appender-tp18840199p27547554.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Reply via email to