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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With