I take it you are counting on Tomcat's child-first classloading. You are putting log4j.jar in WEB-INF/lib and log4j.properties (or log4j.xml) in WEB-INF/classes (in which case, you really don't need to call configure() yourself, but whatever).

A solution to this would be to configure Glassfish to use child-first classloading for webapps. This would provide you with Tomcat-like behavior. Another solution is to use a global Log4j instance and set up a repository selector, preferrably based on JNDI, though a classloader-based one is doable too (though you have to worry about dereferencing the classloader for webapp restarts or you get memory leaks and other classloader-related problems).

Jake


On Mon, 10 Sep 2007 10:24:58 +0100
 "Drinkwater, GJ \(Glen\)" <[EMAIL PROTECTED]> wrote:
Hi

The three applications will be deployed on the same container.  Each app
will use different log4j properties files that I want to log to
different files so that I can identify the logs from each of the
different apps.  With tomcat, this works, but with glassfish it seems
that the whole app is configured through the last application that
executes the ProperyConfigure.configure command.

I was wondering if anyone knows how I can change the configuration or
something so that each app logs to different log files??

Glen



Can you clarify your setup? Do you mean that all three are deployed in
the
same container/VM? Or they're in three different containers/VM's but
they're
 all going to the same log file. Also is there one log4j config or
three
seperate ones?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to