logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie" <post2me...@hotmail.com>
Subject Re: PropertyConfigurator.configure method in J2EE
Date Mon, 01 Oct 2001 23:26:32 GMT
Define a init servlet/jsp  as "load-on-startup"  (see the web.xml spec) per
J2EE application.  Use the init servlet to configure the log properties. If
another application does the same thing.., Swauu... it doesn't matter. At
least in this way you are sure that all the applications are independent and
the log4j engine is correctly configured.
Works fine for me.

Eddie


----- Original Message -----
From: "David Schultz" <dschultz@atstransportation.com>
To: <log4j-user@jakarta.apache.org>
Sent: Monday, October 01, 2001 10:08 PM
Subject: PropertyConfigurator.configure method in J2EE


> If I understand the documentation and discussion threads properly, the
> configure method of the PropertyConfigurator class should only be called
> once be JVM.  (Multiple calls result in multiple occurences of output data
> in the logs.)
>
> So, when using a J2EE server, where is the appropriate place for putting
the
> configure call?
>
> (From the documentation, it is clear how to setup the Tomcat servlet
engine
> to only configure once.  A program with a main() is obvious.  However,
about
> the only thing I have seen for J2EE is to have a stateless session bean
for
> performing the configure.  I guess this would be something done by an
> administrator once the server was brought up.  However, it seems like
there
> should be a cleaner way.)
>
> On a related note, I don't see people talking about the shutdown method of
> the Category class.  Are people just assuming that is okay to let an
> application terminate without closing any open output streams?  Again,
with
> a main() this is obvious.  Although this doesn't seem to be discussed for
> Tomcat or J2EE servers.
>
> David W. Schultz
> AT&S Transportation, LLC: (704) 529-6300 x 125
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message