At 01:08 PM 8/29/2003 -0700, you wrote:
Hi

I've just started using Log4J and had a couple of doubts about how to set it up for a web-based application that uses Webwork.

1. Since Webwork configures log4j to use Configure, is there any way that can be changed to ConfigureAndWatch, without going into Webwork code.

Where do they do this? Are you sure Webwork is not being configured via default initialization rather than specifically calling configure() in their core code?


2. Since there are multiple entry-points for the application, where should I specify the Configurator details (essentially, the ConfigureAndWatch method call)

Assuming they are using default initialization or use an initializer servlet or a servlet context listener, then you can avoid the configure() initialization by using your own initializer servlet or a servlet context listener. See the log4j-sandbox for working code and/or read this...
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/AppContainerLogging


Also, as has been said here by me and by Ceki, you should not be using configureAndWatch() in a container because the watchdogs have no lifecycle to them. Their threads cannot be stopped even when the application is stopped (but the container continues to run). See:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22478


Jake


thanks a lot Rajat.



---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software


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



Reply via email to