From 645a1a936281c0d17becdf162fd4470c1f0e1700 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 29 Nov 2009 14:32:41 +0000 Subject: [PATCH] Better logging of what is going on on Context reload git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@885233 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/core/LocalStrings.properties | 4 ++-- java/org/apache/catalina/core/StandardContext.java | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties index f67360301..993babdf7 100644 --- a/java/org/apache/catalina/core/LocalStrings.properties +++ b/java/org/apache/catalina/core/LocalStrings.properties @@ -110,9 +110,9 @@ standardContext.notStarted=Context has not yet been started standardContext.notWrapper=Child of a Context must be a Wrapper standardContext.parameter.duplicate=Duplicate context initialization parameter {0} standardContext.parameter.required=Both parameter name and parameter value are required -standardContext.reloadingCompleted=Reloading this Context is completed +standardContext.reloadingCompleted=Reloading Context with path [{0}] is completed standardContext.reloadingFailed=Reloading this Context failed due to previous errors -standardContext.reloadingStarted=Reloading this Context has started +standardContext.reloadingStarted=Reloading Context with path [{0}] has started standardContext.resourcesStart=Error starting static Resources standardContext.securityConstraint.pattern=Invalid {0} in security constraint standardContext.servletMap.name=Servlet mapping specifies an unknown servlet name {0} diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index e6b766507..ef6d31e57 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -3259,12 +3259,17 @@ public class StandardContext throw new IllegalStateException (sm.getString("containerBase.notStarted", logName())); + String path = getPath(); + if (path.length() == 0) { + path = "/"; + } + // Make sure reloading is enabled // if (!reloadable) // throw new IllegalStateException // (sm.getString("standardContext.notReloadable")); if(log.isInfoEnabled()) - log.info(sm.getString("standardContext.reloadingStarted")); + log.info(sm.getString("standardContext.reloadingStarted", path)); // Stop accepting requests temporarily setPaused(true); @@ -3283,6 +3288,9 @@ public class StandardContext setPaused(false); + if(log.isInfoEnabled()) + log.info(sm.getString("standardContext.reloadingCompleted", path)); + } -- 2.11.0