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 Ana Paula Brandão Lopes <ap...@yahoo.com.br> on 2005/02/19 18:18:12 UTC

NDC.remove() on web apps

Hello,
I was reading the log4j api where is said the programmer has to call  
NDC.remove() at the end of the run() method of the threads witch make  
nested logs. If this is not done, the thread cannot be requested by the  
JVM, staying in memory.
In web apps, the run methods is not at the programmers hands, the servlet  
container is the responsible for this.
How to solve this?
Ana

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/



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


Re: NDC.remove() on web apps

Posted by Ana Paula Brandão Lopes <ap...@yahoo.com.br>.
Great!
They are executed in a per-thread basis, aren´t they!
Thanks a lot.
On Sun, 20 Feb 2005 08:28:56 +0200 (EET), Juha Laiho <Ju...@iki.fi>  
wrote:

> On Sat, 19 Feb 2005, [iso-8859-15] Ana Paula Brandão Lopes wrote:
>> I was reading the log4j api where is said the programmer has to call
>> NDC.remove() at the end of the run() method of the threads
> [...]
>> In web apps, the run methods is not at the programmers hands, the  
>> servlet
>> container is the responsible for this.
>> How to solve this?
>
> At the end of service (doGet/doPost) method should be good.



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/



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


Re: NDC.remove() on web apps

Posted by Juha Laiho <Ju...@iki.fi>.
On Sat, 19 Feb 2005, [iso-8859-15] Ana Paula Brandão Lopes wrote:
> I was reading the log4j api where is said the programmer has to call  
> NDC.remove() at the end of the run() method of the threads
[...]
> In web apps, the run methods is not at the programmers hands, the servlet  
> container is the responsible for this.
> How to solve this?

At the end of service (doGet/doPost) method should be good.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)


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