I said this to simplify....
I agree that, in a large webapp, you need several loggers; each logger for a 
coherent system.
But you have to control your loggers...

In the initial question, it was like he had one logger for one class...

So, the right answer should be :
in log4j, there is no need for an additionnal method
because, if you control your logger(s), you can freed it(them) when the 
servlet.destroy() is invoked.

I hope it's better like this ... ;-)
Regards.

On Tue, 29 Nov 2005 15:54:52 -0000
"Allistair Crossley" <[EMAIL PROTECTED]> wrote:

> I disagree, only the most trivial webapp needs one logger. A web
> application consisting of a large number of subsystems, potentially
> managed/analysed by different teams should be logged to different
> locations. Effective debugging will come down to a well organised
> logging structure.
> 
> -----Original Message-----
> From: Lionel Farbos [mailto:[EMAIL PROTECTED] 
> Sent: 29 November 2005 15:50
> To: Tomcat Users List
> Cc: [EMAIL PROTECTED]
> Subject: Re: Singleton memory leak after redeploying.
> 
> On Tue, 29 Nov 2005 09:31:28 +0100
> Mikolaj Rydzewski <[EMAIL PROTECTED]> wrote:
> 
> > Lionel Farbos wrote:
> > 
> > >Notes :
> > >- Perhaps your Listener will have to delete other objets like SQL
> drivers, commons logger, ...
> > >- see also : 
> > >http://opensource2.atlassian.com/confluence/spring/pages/viewpage.act
> > >ion?pageId=2669
> > >  
> > >
> > Does log4j have some nice method to free all Logger objects? It seems 
> > like a nightmare to free Loggers from all of my classes by hand...
> 
> I think it's not a good idea to have a lot of logger objects in a webapp
> :
> In a webapp, you need only one logger.
> 
> Then, on the last servlet destroy, you can freed your logger with
> logger=null; I think no other method is needed.
> 
> Regards.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
> -------------------------------------------------------
> QAS Ltd.
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> -------------------------------------------------------
> </FONT> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLACK> 
> Disclaimer:  The information contained within this e-mail is confidential and 
> may be privileged. This email is intended solely for the named recipient 
> only; if you are not authorised you must not disclose, copy, distribute, or 
> retain this message or any part of it. If you have received this message in 
> error please contact the sender at once so that we may take the appropriate 
> action and avoid troubling you further.  Any views expressed in this message 
> are those of the individual sender.  QAS Limited has the right lawfully to 
> record, monitor and inspect messages between its employees and any third 
> party.  Your messages shall be subject to such lawful supervision as QAS 
> Limited deems to be necessary in order to protect its information, its 
> interests and its reputation.  
> 
> Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
> Limited cannot guarantee that attachments are virus free or compatible with 
> your systems and does not accept any liability in respect of viruses or 
> computer problems experienced.
> </FONT>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to