You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jacob Kjome <ho...@visi.com> on 2003/11/22 06:18:37 UTC

RE: setting up multiple log4j configurations for multiple WAR pac kage s?

Does JRun not load from the WebappClassLoader first?  Tomcat does this, and 
I believe the servlet spec defines this behavior (but don't quote me on 
that).  Sounds like the same thing JBoss does by default.  The way Tomcat 
works makes things much easier to work with since libraries in the server 
won't mess up your webapp which has its own versions locally with the 
webapp.  I'll be JRun can be configured to load from the WebappClassLoader 
first.  Might want to look at see.  Otherwise, you can do configuration 
yourself and use a repository selector from the log4j sandbox.  Search the 
archives and the Wiki for more info on using repository selectors in 
application servers.

Jake

At 09:21 AM 11/21/2003 -0700, you wrote:
>Hi Ken,
>Thanks for the reply.
>
>That's a good idea, and that should (logically) work.
>
>We're using JRun as our servlet engine, and I've discovered that on a global
>level, it loads up a log4j.properties file which is buried in one of the
>.jars that ships with the product. This one seems to be trumping all of the
>ones defined in the WAR packages.
>
>I'm attempting to remove it in order to keep the logging at an application
>level, so we'll see how that goes.
>
>I'd also like to ask if there was a way to specify where to dump said log
>files? If we have multiple WAR packages all configured to use log4j, we'd
>like them to be dumped at a location of our choosing (rather than a location
>chosen by the application), for security reasons.
>
>Is this possible?
>
>ie. maybe setup a global log4j.properties file which defines a filepath for
>all child log4j.xml objects?? *shrug*
>
>IS this even possible?
>
>thanks again!
>
>
>-----Original Message-----
>From: Ken.Liu@bmwna.com [mailto:Ken.Liu@bmwna.com]
>Sent: Friday, November 21, 2003 8:37 AM
>To: log4j-user@jakarta.apache.org
>Subject: RE: setting up multiple log4j configurations for multiple WAR pac
>kage s?
>
>
>IMHO, the simplest and easiest configuration to maintain is to place
>log4j.jar in WEB-INF/lib and log4j.xml in WEB-INF/classes in each WAR.  This
>should work fine without any additional server configuration.  You should
>not have log4j.jar in your server's classpath or logging won't be separate
>between webapps.
>
>Ken
>
> > -----Original Message-----
> > From: Yuzwa, Erik [mailto:Erik.Yuzwa@encana.com]
> > Sent: Friday, November 21, 2003 8:30 AM
> > To: 'Log4J Users List'
> > Subject: setting up multiple log4j configurations for multiple WAR
> > package s?
> >
> >
> > Hi all,
> >
> > I'm sorry if this is a FAQ, as I've looked everywhere and
> > can't find very
> > many
> > resources on setting up multiple log4j configurations for
> > different WAR
> > packages
> > (ie. a seperate set of log files for each WAR app).
> >
> > I've tried including a log4j.xml and log4j.blah.jar file with
> > each WAR, but
> > that
> > doesn't seem to work properly.
> >
> > Is there a configuration setting that I'm missing on the
> > servlet container
> > itself?
> > Should the log4j.blah.jar file be in the classpath of the
> > servlet container
> > or
> > remain on the application layer?
> >
> > thanks!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> >
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org