tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Armbrust <daniel.armbrust.l...@gmail.com>
Subject Re: And even further into the black magic of logging configuration within tomcat...
Date Mon, 06 Apr 2009 21:42:18 GMT
> If you deploy more than one
> webapp, log4j doesn't attempt to self-configure in the second or any
> subsequent webapps.
>

Just to close out this thread - no big surprise here - I found the bug
in a library that I was deploying in one of my webapps that caused
this behaviour.

Some code was executing this:

System.setProperty("log4j.defaultInitOverride", "true");

in a static init block.

Depending on the order that the static init blocks would be run (this
first, or log4j's first) would change whether log4j would try to
configure itself, since log4j pays attention to that System variable.

And also, since this is a global JVM variable, one webapp setting this
property would affect the behaviour of other webapps - but again, it
would be order dependant.

Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message