By default, Log4j looks for a configuration file named or log4j.xml under classes folder of your webapp.

Sometimes you may need externalize Log4j configuration out of your application archive. As you know, it supports two kind of configuration file: *.properties and *.xml.

Below is showed how to tell to Log4j which configuration file load.

Properties configuration


XML configuration



Leave a Reply