You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/09/12 23:27:53 UTC
svn commit: r1169937 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java
Author: hlship
Date: Mon Sep 12 21:27:53 2011
New Revision: 1169937
URL: http://svn.apache.org/viewvc?rev=1169937&view=rev
Log:
Tweak the order and output of startup information
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java?rev=1169937&r1=1169936&r2=1169937&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java Mon Sep 12 21:27:53 2011
@@ -21,11 +21,7 @@ import org.apache.tapestry5.ioc.Registry
import org.apache.tapestry5.ioc.def.ContributionDef;
import org.apache.tapestry5.ioc.def.ModuleDef;
import org.apache.tapestry5.ioc.internal.util.InternalUtils;
-import org.apache.tapestry5.ioc.services.ServiceActivity;
-import org.apache.tapestry5.ioc.services.ServiceActivityScoreboard;
-import org.apache.tapestry5.ioc.services.Status;
-import org.apache.tapestry5.ioc.services.SymbolProvider;
-import org.apache.tapestry5.ioc.services.SymbolSource;
+import org.apache.tapestry5.ioc.services.*;
import org.apache.tapestry5.services.TapestryModule;
import org.slf4j.Logger;
@@ -60,14 +56,10 @@ public class TapestryAppInitializer
private Registry registry;
/**
- * @param logger
- * logger for output confirmation
- * @param appPackage
- * root package name to search for pages and components
- * @param appName
- * the name of the application (i.e., the name of the application servlet)
- * @param aliasMode
- * ignored (was used in 5.2)
+ * @param logger logger for output confirmation
+ * @param appPackage root package name to search for pages and components
+ * @param appName the name of the application (i.e., the name of the application servlet)
+ * @param aliasMode ignored (was used in 5.2)
* @deprecated Use {@link #TapestryAppInitializer(Logger, String, String)} instead. To be removed
* in 5.4.
*/
@@ -77,12 +69,9 @@ public class TapestryAppInitializer
}
/**
- * @param logger
- * logger for output confirmation
- * @param appPackage
- * root package name to search for pages and components
- * @param appName
- * the name of the application (i.e., the name of the application servlet)
+ * @param logger logger for output confirmation
+ * @param appPackage root package name to search for pages and components
+ * @param appName the name of the application (i.e., the name of the application servlet)
*/
public TapestryAppInitializer(Logger logger, String appPackage, String appName)
{
@@ -91,20 +80,15 @@ public class TapestryAppInitializer
}
/**
- * @param logger
- * logger for output confirmation
- * @param appProvider
- * provides symbols for the application (normally, from the ServletContext init
- * parameters)
- * @param appName
- * the name of the application (i.e., the name of the application servlet)
- * @param aliasMode
- * ignored (was used in 5.2 and earlier)
- * @param executionModes
- * an optional, comma-separated list of execution modes, each of which is used
- * to find a list of additional module classes to load (key
- * <code>tapestry.<em>name</em>-modules</code> in appProvider, i.e., the servlet
- * context)
+ * @param logger logger for output confirmation
+ * @param appProvider provides symbols for the application (normally, from the ServletContext init
+ * parameters)
+ * @param appName the name of the application (i.e., the name of the application servlet)
+ * @param aliasMode ignored (was used in 5.2 and earlier)
+ * @param executionModes an optional, comma-separated list of execution modes, each of which is used
+ * to find a list of additional module classes to load (key
+ * <code>tapestry.<em>name</em>-modules</code> in appProvider, i.e., the servlet
+ * context)
* @deprecated Use {@link #TapestryAppInitializer(Logger, SymbolProvider, String, String)} instead.
* To be removed in 5.4.
*/
@@ -115,18 +99,14 @@ public class TapestryAppInitializer
}
/**
- * @param logger
- * logger for output confirmation
- * @param appProvider
- * provides symbols for the application (normally, from the ServletContext init
- * parameters)
- * @param appName
- * the name of the application (i.e., the name of the application servlet)
- * @param executionModes
- * an optional, comma-separated list of execution modes, each of which is used
- * to find a list of additional module classes to load (key
- * <code>tapestry.<em>name</em>-modules</code> in appProvider, i.e., the servlet
- * context)
+ * @param logger logger for output confirmation
+ * @param appProvider provides symbols for the application (normally, from the ServletContext init
+ * parameters)
+ * @param appName the name of the application (i.e., the name of the application servlet)
+ * @param executionModes an optional, comma-separated list of execution modes, each of which is used
+ * to find a list of additional module classes to load (key
+ * <code>tapestry.<em>name</em>-modules</code> in appProvider, i.e., the servlet
+ * context)
*/
public TapestryAppInitializer(Logger logger, SymbolProvider appProvider, String appName, String executionModes)
{
@@ -227,13 +207,9 @@ public class TapestryAppInitializer
SymbolSource source = registry.getService("SymbolSource", SymbolSource.class);
- StringBuilder buffer = new StringBuilder("Startup status:\n\n");
+ StringBuilder buffer = new StringBuilder("Startup status:\n\nServices:\n\n");
Formatter f = new Formatter(buffer);
- f.format("Application '%s' (Tapestry version %s).\n\n"
- + "Startup time: %,d ms to build IoC Registry, %,d ms overall.\n\n" + "Startup services status:\n",
- appName, source.valueForSymbol(SymbolConstants.TAPESTRY_VERSION), registryCreatedTime - startTime,
- toFinish - startTime);
int unrealized = 0;
@@ -267,12 +243,19 @@ public class TapestryAppInitializer
f.format("\n%4.2f%% unrealized services (%d/%d)\n", 100. * unrealized / serviceActivity.size(), unrealized,
serviceActivity.size());
+
+ f.format("\nApplication '%s' (version %s) startup time: %,d ms to build IoC Registry, %,d ms overall.", appName,
+ source.valueForSymbol(SymbolConstants.APPLICATION_VERSION),
+ registryCreatedTime - startTime,
+ toFinish - startTime);
+
+
buffer.append("\n\n");
buffer.append(" ______ __ ____\n");
buffer.append("/_ __/__ ____ ___ ___ / /_______ __ / __/\n");
buffer.append(" / / / _ `/ _ \\/ -_|_-</ __/ __/ // / /__ \\ \n");
buffer.append("/_/ \\_,_/ .__/\\__/___/\\__/_/ \\_, / /____/\n");
- buffer.append(" /_/ /___/ \n\n");
+ f.format(" /_/ /___/ %s\n\n", source.valueForSymbol(SymbolConstants.TAPESTRY_VERSION));
logger.info(buffer.toString());
}