Author: violetagg
Date: Thu Apr 24 12:59:10 2014
New Revision: 1589703
URL: http://svn.apache.org/r1589703
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56382
Merged revision 1589698 from tomcat/trunk:
Add information about finished deployment and its execution time to the logs.
Patch provided by Danila Galimov.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1589698
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1589703&r1=1589702&r2=1589703&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java Thu
Apr 24 12:59:10 2014
@@ -606,9 +606,11 @@ public class HostConfig
DeployedApplication deployedApp =
new DeployedApplication(cn.getName(), true);
+ long startTime = 0;
// Assume this is a configuration descriptor and deploy it
if(log.isInfoEnabled()) {
- log.info(sm.getString("hostConfig.deployDescriptor",
+ startTime = System.currentTimeMillis();
+ log.info(sm.getString("hostConfig.deployDescriptor",
contextXml.getAbsolutePath()));
}
@@ -744,6 +746,11 @@ public class HostConfig
if (host.findChild(context.getName()) != null) {
deployed.put(context.getName(), deployedApp);
}
+
+ if (log.isInfoEnabled()) {
+ log.info(sm.getString("hostConfig.deployDescriptor.finished",
+ contextXml.getAbsolutePath(),
Long.valueOf(System.currentTimeMillis() - startTime)));
+ }
}
@@ -1040,10 +1047,13 @@ public class HostConfig
DeployedApplication deployedApp = new DeployedApplication(cn.getName(),
xml.exists() && deployXML && copyThisXml);
+ long startTime = 0;
// Deploy the application in this WAR file
- if(log.isInfoEnabled())
+ if(log.isInfoEnabled()) {
+ startTime = System.currentTimeMillis();
log.info(sm.getString("hostConfig.deployWar",
war.getAbsolutePath()));
+ }
try {
// Populate redeploy resources with the WAR file
@@ -1099,6 +1109,11 @@ public class HostConfig
}
deployed.put(cn.getName(), deployedApp);
+
+ if (log.isInfoEnabled()) {
+ log.info(sm.getString("hostConfig.deployWar.finished",
+ war.getAbsolutePath(), Long.valueOf(System.currentTimeMillis()
- startTime)));
+ }
}
@@ -1148,10 +1163,13 @@ public class HostConfig
protected void deployDirectory(ContextName cn, File dir) {
+ long startTime = 0;
// Deploy the application in this directory
- if( log.isInfoEnabled() )
+ if( log.isInfoEnabled() ) {
+ startTime = System.currentTimeMillis();
log.info(sm.getString("hostConfig.deployDir",
dir.getAbsolutePath()));
+ }
Context context = null;
File xml = new File(dir, Constants.ApplicationContextXml);
@@ -1275,6 +1293,11 @@ public class HostConfig
}
deployed.put(cn.getName(), deployedApp);
+
+ if( log.isInfoEnabled() ) {
+ log.info(sm.getString("hostConfig.deployDir.finished",
+ dir.getAbsolutePath(),
Long.valueOf(System.currentTimeMillis() - startTime)));
+ }
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1589703&r1=1589702&r2=1589703&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
Thu Apr 24 12:59:10 2014
@@ -92,13 +92,16 @@ hostConfig.deployDescriptor.blocked=The
hostConfig.deployDescriptor.error=Error deploying configuration descriptor {0}
hostConfig.deployDescriptor.threaded.error=Error waiting for multi-thread
deployment of context descriptors to complete
hostConfig.deployDescriptor.localDocBaseSpecified=A docBase {0} inside the
host appBase has been specified, and will be ignored
+hostConfig.deployDescriptor.finished=Deployment of configuration descriptor
{0} has finished in {1} ms
hostConfig.deployDir=Deploying web application directory {0}
hostConfig.deployDir.error=Error deploying web application directory {0}
hostConfig.deployDir.threaded.error=Error waiting for multi-thread deployment
of directories to complete
+hostConfig.deployDir.finished=Deployment of web application directory {0} has
finished in {1} ms
hostConfig.deployWar=Deploying web application archive {0}
hostConfig.deployWar.error=Error deploying web application archive {0}
hostConfig.deployWar.hiddenDir=The directory [{0}] will be ignored because the
WAR [{1}] takes priority and unpackWARs is false
hostConfig.deployWar.threaded.error=Error waiting for multi-thread deployment
of WAR files to complete
+hostConfig.deployWar.finished=Deployment of web application archive {0} has
finished in {1} ms
hostConfig.deploy.error=Exception while deploying web application directory {0}
hostConfig.deploying=Deploying discovered web applications
hostConfig.expand=Expanding web application archive {0}
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1589703&r1=1589702&r2=1589703&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Apr 24 12:59:10 2014
@@ -87,6 +87,11 @@
reverts all the operations performed when adding an MBean notification
listener. (markt)
</fix>
+ <add>
+ <bug>56382</bug>: Information about finished deployment and its
execution
+ time is added to the log files. Patch is provided by Danila Galimov.
+ (violetagg)
+ </add>
<fix>
Only create XML parsing objects if required and fix associated
potential
memory leak in the default Servlet. (markt)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]