superscral
superscral

Reputation: 480

log4j configuration loading

I have several log4j.xml logj configuration file in my tomcat application. One out of the application in /home/toto/etc/log4j.xml and one other in my WEB-INF/classes/ application.

These two configuration files seems to be loaded but, do you know in which order there are loaded, or if they are merged at the compilation?

Upvotes: 0

Views: 197

Answers (1)

cowls
cowls

Reputation: 24354

You can add this parameter to the JVM args to see what log4j is doing, it will then log from where it loads the configuration:

-Dlog4j.debug

Also if you wish to override them I think log4j.properties file takes precedence over .xml files, so you could create a log4j.properties file.

Upvotes: 2

Related Questions