George
George

Reputation: 915

Log4j.properties on classpath but not loaded

I'm using maven and the one-jar plugin to build my project and I have my log4j.properties in src/main/resources. I've used the one-jar.verbose to check that is on the classpath and other properties files in the same directory are being successfully used by the program. However when I run it I still get the following error:

log4j:WARN No appenders could be found for logger (org.springframework.test.context.junit4.SpringJUnit4ClassRunner).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Using BasicConfigurator.configure() is a quick fix, but I need it to be in an external config file.

Any ideas?

Upvotes: 1

Views: 480

Answers (1)

George
George

Reputation: 915

The appender I'd configured in log4j.properties, I hadn't added to log4j.rootLogger=...

Upvotes: 1

Related Questions