Due to some other constraints, I appear to be
forced to have my log4j.jar at both the EAR and WAR classpath level. In my
WebLogic config, I'm doing everything I can to make it "prefer" the jars in
the webapp.
If you are using Weblogic 9.2+, then you may be able to use a
FilteringClassLoader [1], so that application library contents of the EAR
file are loaded in preference to those from the server classpath. In
"META-INF/weblogic-application.xml" you'd add the following....
<prefer-application-packages>
<package-name>org.apache.log4j.*</package-name>
</prefer-application-packages>
You'd simply make sure to place log4j.jar in the EAR's APP-INF/lib or add it
as a manifest Class-Path entry in the EAR's manifest.mf. Note that I haven't
verified whether this actually achieves per/app logging configuration. Maybe
you can try it out and report results?
[1]
http://download.oracle.com/docs/cd/E13222_01/wls/docs92/programming/classloading.html#wp1097187
Jake
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org