Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

log4j warning issue - apache commons

I'm using apache commons library and log4j. I have an xml configuration file and a log4j.properties files. I want to specify my log4j properties path inside my xml configuration file. To load my settings i do:

//Loading my xml file
this.config = new XMLConfiguration(this.xmlFileName);  

At this moment the following warnings are raised:

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

However i haven't yet called any log4j object. Once i have read the xml file i can successfully work with my log4j instance. Is there any way to remove those warnings?

like image 650
Matteo Codogno Avatar asked Apr 03 '12 10:04

Matteo Codogno


1 Answers

Check if the log4j.properties file is in the classpath

This link might be useful: http://www.coderanch.com/t/63230/open-source/log-log-WARN-No-appenders

like image 166
Michael Fernando Avatar answered Sep 26 '22 02:09

Michael Fernando