1
votes

Our application utilized ActiveMQ 5.9.0 client. When we load up the application, I'm getting a message logged to the console stating:

log4j:WARN No appenders could be found for logger (org.apache.activemq.thread.TaskRunnerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

I'm having trouble with this, becuase it seems that this is being generated by log4j 1.2, and our application uses log4j 2.7. Logging appears to work normally, but we are not seeing any logging output by the ActiveMQ client itself. A search for this issue said to run the BasicConfigurator.configure() method, but log4j 2.7 has no such method. What do I do?

How do I configure the logger for ActiveMQ Client 5.9.0?

1

1 Answers

1
votes

The 5.x client is based on log4j 1.2 using the slf4j logging facade so you could possibly use some dependency magic to strip out the 1.2 impl from the client dependency when you pull it into your project and instead bring in the slf4j binding for log4j 2.

The client seems to be logging that it cannot find a log4j.properties file with configuration to allow it to add appenders so to fix that you can create a suitable log4j configuration to fix this warning.