Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 845576131 for ; Tue, 7 Jun 2011 18:18:31 +0000 (UTC) Received: (qmail 98039 invoked by uid 500); 7 Jun 2011 18:18:30 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 97989 invoked by uid 500); 7 Jun 2011 18:18:30 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 97980 invoked by uid 99); 7 Jun 2011 18:18:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 18:18:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 18:18:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C0A5323888DD; Tue, 7 Jun 2011 18:18:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1133122 - in /tomcat/trunk: java/org/apache/jasper/compiler/TldLocationsCache.java java/org/apache/jasper/resources/LocalStrings.properties webapps/docs/changelog.xml Date: Tue, 07 Jun 2011 18:18:06 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110607181806.C0A5323888DD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Tue Jun 7 18:18:06 2011 New Revision: 1133122 URL: http://svn.apache.org/viewvc?rev=1133122&view=rev Log: Don't overwhelm logs with TLD scanning messages but make users aware there is room for improvement and tell them how to get at the detail. Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java?rev=1133122&r1=1133121&r2=1133122&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java Tue Jun 7 18:18:06 2011 @@ -96,6 +96,10 @@ public class TldLocationsCache { // Names of JARs that are known not to contain any TLDs private static Set noTldJars = null; + // Flag that indicates that an INFO level message has been provided that + // there are JARs that could be skipped + private static volatile boolean showTldScanWarning = true; + /** * The mapping of the 'global' tag library URI to the location (resource * path) of the TLD associated with that tag library. The location is @@ -438,8 +442,15 @@ public class TldLocationsCache { } if (!foundTld) { - log.info(Localizer.getMessage("jsp.tldCache.noTldInJar", - resourcePath)); + if (log.isDebugEnabled()) { + log.debug(Localizer.getMessage("jsp.tldCache.noTldInJar", + resourcePath)); + } else if (showTldScanWarning) { + // Not entirely thread-safe but a few duplicate log messages are + // not a huge issue + showTldScanWarning = true; + log.info(Localizer.getMessage("jsp.tldCache.noTldSummary")); + } } } Modified: tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=1133122&r1=1133121&r2=1133122&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties Tue Jun 7 18:18:06 2011 @@ -491,3 +491,4 @@ jsp.message.jsp_unload_check=Checking JS xmlParser.skipBomFail=Failed to skip BOM when parsing XML input stream jsp.tldCache.noTldInJar=No TLD files were found in [{0}]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties +jsp.tldCache.noTldSummary=At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned where no TLDs were found. Skipping JAR scanning can improve startup time and JSP compilation time. \ No newline at end of file Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1133122&r1=1133121&r2=1133122&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Jun 7 18:18:06 2011 @@ -60,6 +60,16 @@ + + + + Change JAR scanning log messages where no TLDs are found to DEBUG level + and replace the multiple messages with a single INFO level message that + indicates that at least one JAR was scanned needlessly and how to obtain + more info. (markt) + + + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org