From 5584252d217914eef09b14f17f5f145bb1c75f94 Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 2 Jul 2010 10:01:32 +0000 Subject: [PATCH] Additional debug logging for manager selection git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@959931 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/core/LocalStrings.properties | 2 ++ java/org/apache/catalina/core/StandardContext.java | 9 +++++++++ webapps/docs/changelog.xml | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties index f628319b6..b1a794d5d 100644 --- a/java/org/apache/catalina/core/LocalStrings.properties +++ b/java/org/apache/catalina/core/LocalStrings.properties @@ -92,6 +92,7 @@ standardContext.alreadyStarted=Context has already been started standardContext.applicationListener=Error configuring application listener of class {0} standardContext.applicationSkipped=Skipped installing application listeners due to previous error(s) standardContext.badRequest=Invalid request path ({0}). +standardContext.cluster.noManager=No manager found. Checking if cluster manager should be used. Cluster configured: [{0}], Application distributable: [{1}] standardContext.crlfinurl=The URL pattern "{0}" contains a CR or LF and so can never be matched. standardContext.duplicateListener=The listener "{0}" is already configured for this context. The duplicate definition has been ignored. standardContext.errorPage.error=Error page location {0} must start with a ''/'' @@ -116,6 +117,7 @@ standardContext.loginConfig.errorWarning=WARNING: Form error page {0} must start standardContext.loginConfig.loginPage=Form login page {0} must start with a ''/' standardContext.loginConfig.loginWarning=WARNING: Form login page {0} must start with a ''/'' in Servlet 2.4 standardContext.loginConfig.required=LoginConfig cannot be null +standardContext.manager=Configured a manager of class [{0}] standardContext.mappingError=MAPPING configuration error for relative URI {0} standardContext.noResourceJar=Resource JARs are not supported. The JAR found at [{0}] will no be used to provide static content for context with path [{1}] standardContext.notFound=The requested resource ({0}) is not available. diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index 081536354..b4a1bd5fc 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -4682,6 +4682,11 @@ public class StandardContext extends ContainerBase // Acquire clustered manager Manager contextManager = null; if (manager == null) { + if (log.isDebugEnabled()) { + log.debug(sm.getString("standardContext.cluster.noManager", + Boolean.valueOf((getCluster() != null)), + Boolean.valueOf(distributable))); + } if ( (getCluster() != null) && distributable) { try { contextManager = getCluster().createManager(getName()); @@ -4696,6 +4701,10 @@ public class StandardContext extends ContainerBase // Configure default manager if none was specified if (contextManager != null) { + if (log.isDebugEnabled()) { + log.debug(sm.getString("standardContext.manager", + contextManager.getClass().getName())); + } setManager(contextManager); } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 4714f9475..1bd00834b 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -88,6 +88,10 @@ than a 200 is returned for requests that don't map to any other context. (markt) + + Additional debug logging in StandardContext to provide information on + Manager selection. (markt) + -- 2.11.0