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 BillWorker 2i Development Team <bi...@info.com.np> on 2001/05/11 12:58:10 UTC

using log4j in a web application

Hi!

I have just started using log4j. I plan to use it in a web application. 
My question is do I have to create new instances and set the 
configuration each time I access it from different places in my web 
application? For example, I would access it from the jsp page, servlet, 
beans and other java classes.

Regards,
Ashish


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


Re: using log4j in a web application

Posted by BillWorker 2i Development Team <bi...@info.com.np>.
Robert Burrell Donkin wrote:
> no.
> log4j's configuration is shared by the entire VM.
> take a look in the archives about where and when to configure.
> 
> - robert
> 

Yes, found out that it is shared by the VM. That was real nice. I am now
loading a servlet on start up to configure the log4j and accessing it
from all the other places I need.


-- 
BillWorker 2i Development Team,
Infocom Solutions Pvt. Ltd.

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


Re: using log4j in a web application

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.
BillWorker 2i Development Team wrote:

> Hi!
>
> I have just started using log4j. I plan to use it in a web application.
> My question is do I have to create new instances and set the
> configuration each time I access it from different places in my web
> application? For example, I would access it from the jsp page, servlet,
> beans and other java classes.

no.
log4j's configuration is shared by the entire VM.
take a look in the archives about where and when to configure.

- robert


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