Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 26012 invoked from network); 7 Jun 2006 16:17:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jun 2006 16:17:02 -0000 Received: (qmail 20409 invoked by uid 500); 7 Jun 2006 16:16:57 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 20210 invoked by uid 500); 7 Jun 2006 16:16:56 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 20199 invoked by uid 99); 7 Jun 2006 16:16:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jun 2006 09:16:56 -0700 X-ASF-Spam-Status: No, hits=1.1 required=10.0 tests=INFO_TLD,MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [195.137.181.71] (HELO sh-evy01mgw3.accor-hotels.com) (195.137.181.71) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jun 2006 09:16:54 -0700 Received: from s-eu-evy01mx3.eu.accor.net (unverified) by sh-evy01mgw3.accor-hotels.com (Content Technologies SMTPRS 4.3.14) with ESMTP id for ; Wed, 7 Jun 2006 18:22:29 +0200 Received: from sheu-evy01mxcl1.eu.htl.accor.net ([57.200.0.153]) by s-eu-evy01mx3.eu.accor.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 7 Jun 2006 18:16:32 +0200 Received: from WOLAMYXP ([57.200.217.202]) by sheu-evy01mxcl1.eu.htl.accor.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 7 Jun 2006 18:16:31 +0200 From: "Olivier Lamy" To: "'Jakarta Commons Users List'" Subject: RE : RE : Log4j String buffer memory Leak. Date: Wed, 7 Jun 2006 18:16:31 +0200 Message-ID: <007b01c68a4d$bd5c5e60$cad9c839@eu.accor.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <20060607160241.98519.qmail@web51513.mail.yahoo.com> Importance: Normal X-OriginalArrivalTime: 07 Jun 2006 16:16:31.0962 (UTC) FILETIME=[BD4BE3A0:01C68A4D] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N IMHO, When you do logger.debug(connectionID + "-" + message); The string concatenation is evaluated before the call to the logger. You will find some litterature to this on google. HTH -- Olivier -----Message d'origine----- De : Naveen [mailto:naween18@yahoo.com]=20 Envoy=E9 : mercredi 7 juin 2006 18:03 =C0 : Jakarta Commons Users List Objet : Re: RE : Log4j String buffer memory Leak. yes i use the first one..but will that cause memory leak if my logging level is turned to INFO =20 Thanks, Naveen. Olivier Lamy wrote: Simple question=20 You made logger.debug(connectionID + "-" + message); Or=20 If (logger.isDebugEnabled())=20 { logger.debug(connectionID + "-" + message); } If using first, you create some String instance for nothing. -- Olivier -----Message d'origine----- De : Naveen [mailto:naween18@yahoo.com]=20 Envoy=E9 : mercredi 7 juin 2006 16:45 =C0 : 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=20 1. org.apache.log4j.Logger.debug=20 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=20 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=20 http://mail.yahoo.com=20 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 =E9lectronique et tous les fichiers joints ainsi que les informations contenues dans ce message ( ci apr=E8s "le message" ), sont confidentiels et destin=E9s exclusivement =E0 l'usage de la personne =E0 laquelle ils sont adress=E9s. Si vous avez re=E7u ce message par erreur, merci de le renvoyer =E0 son =E9metteur et de le d=E9truire. Toutes = diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non express=E9ment autoris=E9es 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 Naveen=20 =20 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=20 http://mail.yahoo.com=20 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org