commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lamy" <olivier.l...@accor.com>
Subject RE : Log4j String buffer memory Leak.
Date Wed, 07 Jun 2006 15:14:30 GMT
Simple question 
You made
 
logger.debug(connectionID + "-" + message);

Or 

If (logger.isDebugEnabled()) 
{
logger.debug(connectionID + "-" + message);
}

If using first, you create some String instance for nothing.

--
Olivier

-----Message d'origine-----
De : Naveen [mailto:naween18@yahoo.com] 
Envoyé : mercredi 7 juin 2006 16:45
À : commons-user@jakarta.apache.org
Objet : Log4j String buffer memory Leak.


Hello all,
   
  Iam not sure if there is really amemory leak in Log4jLogger. We use
Mercury diagnosis tool to find the memory leak and the reports show all
the string buffers being held up at 
   
  1. org.apache.log4j.Logger.debug 
  2. org.apache.log4j.Logger.info
   
  this is one of the call we make
   
  logger.debug(connectionID + "-" + message);
   
  logger is an instance of Log4j.Logger and connectionID,message are
strings
   
  i know appending strings will internally create StrinBuffers but our
memory reports show string buffers are never cleared which are areated
during that call.
   
  any help is highly appreciated.
   
  Thanks,
  Naveen.
   
   
   
   


    Naveen 
   
  It only takes a moment to be kind, but the results can be
everlasting.!!



 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



This e-mail, any attachments and the information contained therein ("this message") are confidential
and intended solely for the use of the addressee(s). If you have received this message in
error please send it back to the sender and delete it. Unauthorized publication, use, dissemination
or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues
dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement
à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par
erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication,
totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées
de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------


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


Mime
View raw message