Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 71913 invoked from network); 3 Mar 2010 16:10:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Mar 2010 16:10:46 -0000 Received: (qmail 85491 invoked by uid 500); 3 Mar 2010 16:10:35 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 85453 invoked by uid 500); 3 Mar 2010 16:10:34 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 85444 invoked by uid 99); 3 Mar 2010 16:10:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Mar 2010 16:10:34 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [76.96.59.211] (HELO QMTA11.westchester.pa.mail.comcast.net) (76.96.59.211) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Mar 2010 16:10:26 +0000 Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74]) by QMTA11.westchester.pa.mail.comcast.net with comcast id odA41d0051c6gX85BgA5Tt; Wed, 03 Mar 2010 16:10:05 +0000 Received: from [192.168.1.202] ([98.218.200.175]) by omta23.westchester.pa.mail.comcast.net with comcast id ogCM1d00Z3nZbXm3jgCN5K; Wed, 03 Mar 2010 16:12:22 +0000 Message-ID: <4B8E89DD.7070007@christopherschultz.net> Date: Wed, 03 Mar 2010 11:10:05 -0500 From: Christopher Schultz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Access Log /Filter/? References: <4B88381F.3030502@christopherschultz.net> <4B8D4DE5.9090508@christopherschultz.net> <4B8D78E9.9050000@christopherschultz.net> <4B8D9686.60209@christopherschultz.net> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Xie, On 3/2/2010 6:20 PM, Xie Xiaodong wrote: > Second, you are absolutely right about the log.info(....). I first > wrote like this for testing and forgot to get it back to debug > level. Don't forget that calling log.debug() with a bunch of string concatenations still performs those string concatenations. It's better to do something like this: if(log.isDebugEnabled()) log.debug(something + something else + a third thing); > In modern jvm, it does not matter much between StringBuffer and > StringBuilder, jvm will change StringBuffer used in single thread > scenario into StringBuilder automaticlly. No, it won't: if you ask for StringBuffer, you'll get a StringBuffer. If you just do "a" + "b", the /compiler/ will use StringBuilder if your target is 1.5+ but the JVM doesn't do anything like what you describe. > You could google this information. There are some benchmark test > about it. I'd love to see an example demonstrating your claim. - -chis -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAkuOid0ACgkQ9CaO5/Lv0PD7FQCYjz53of2knok9gwKfyShrecka JACgjWY1WBpOYTSTJJ5dlDOO5BAnJJ4= =8yWQ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org