> -----Original Message----- > From: Jacob Kjome [mailto:[email protected]] > Sent: Thursday, May 26, 2011 2:15 PM > To: Log4J Users List > Subject: Re: Getting "Could not find root logger information" but I > don't see why > > > >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?
This whole issue became somewhat moot when I discovered that the other library, which said it uses Log4J, is actually directly using java.util.logging, so I was able to implement a separate configuration setup for that. However, it's only a matter of time before we end up with more than one webapp using log4j. I'll have to dive into this again when we get to that point. I'm familiar with all of the "prefer" elements in WebLogic's config, so we'll see what happens. > > [1] > http://download.oracle.com/docs/cd/E13222_01/wls/docs92/programming/cla > ssloading.html#wp1097187 > > > Jake > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
