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 2002/11/25 21:27:51 UTC

Re[2]: Tomcat

Hello Derrick,

I have created a system for both configuring log4j and cleaning up
after log4j and implemented Ceki's Repository Selector.  See what I
had to say here:

http://marc.theaimsgroup.com/?l=log4j-user&m=103783030706455&w=2

It takes into consideration whether the app is served from the
filesystem (where you can use configureAndWatch) or served from a .war
file (where you are limited to configure).

Jake

Monday, November 25, 2002, 1:53:29 PM, you wrote:


KD> True, the unpackWars property must be true.
KD> However, there is no "configureAndWatch" method which takes a URL.
KD> If using configure, you will only pick up changes by restarting the server.

KD> -----Original Message-----
KD> From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] 
KD> Sent: Monday, November 25, 2002 2:25 PM
KD> To: Log4J Users List
KD> Subject: RE: Tomcat

KD> Hi,

>>I do a similar thing as Yoav suggests.
>>
>>String systemId =
KD> getServletContext().getRealPath("/conf/logconfig.xml");
>>DOMConfigurator.configureAndWatch(systemId, logConfigWatch);

KD> Note a key difference between my suggestion and the above: the above
KD> will not work if you're deploying out of a .war file.  getRealPath() for
KD> anything returns null if inside a .war.

KD> Thankfully you should be able to substitute getResource() for
KD> getRealPath() as the configurator api supports the configure(URL url)
KD> methods.

KD> Yoav Shapira
KD> Millennium ChemInformatics

KD> --
KD> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
KD> For additional commands, e-mail: <ma...@jakarta.apache.org>
KD> This electronic transmission is strictly confidential to Smith & Nephew and
KD> intended solely for the addressee.  It may contain information which is
KD> covered by legal, professional or other privilege.  If you are not the
KD> intended addressee, or someone authorized by the intended addressee to
KD> receive transmissions on behalf of the addressee, you must not retain,
KD> disclose in any form, copy or take any action in reliance on this
KD> transmission.  If you have received this transmission in error, please
KD> notify the sender as soon as possible and destroy this message.

KD> --
KD> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
KD> For additional commands, e-mail: <ma...@jakarta.apache.org>



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>