svn commit: r1789533 - in /ofbiz/ofbiz-framework/trunk: NOTICE framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1789533 - in /ofbiz/ofbiz-framework/trunk: NOTICE framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java

James Yong-2
Author: jamesyong
Date: Thu Mar 30 15:26:37 2017
New Revision: 1789533

URL: http://svn.apache.org/viewvc?rev=1789533&view=rev
Log:
Implemented: OFBiz Startup Message
(OFBIZ-9285)

Provide log message after all containers/components are loaded.
This helps to inform new developer that OFBiz has started.

Thanks: Jacques and Taher for code review and mentoring.

Modified:
    ofbiz/ofbiz-framework/trunk/NOTICE
    ofbiz/ofbiz-framework/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java

Modified: ofbiz/ofbiz-framework/trunk/NOTICE
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/NOTICE?rev=1789533&r1=1789532&r2=1789533&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/NOTICE (original)
+++ ofbiz/ofbiz-framework/trunk/NOTICE Thu Mar 30 15:26:37 2017
@@ -3,3 +3,13 @@ Copyright 2001-2017 The Apache Software
 
 This product includes software developed by
 The Apache Software Foundation (http://www.apache.org/).
+
+=========================================================================
+
+This product uses ascii art with "Slant" font.
+
+Slant by Glenn Chappell 3/93 -- based on Standard
+Includes ISO Latin-1
+figlet release 2.1 -- 12 Aug 1994
+Permission is hereby given to modify this font, as long as the
+modifier's name is placed on a comment line.
\ No newline at end of file

Modified: ofbiz/ofbiz-framework/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java?rev=1789533&r1=1789532&r2=1789533&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java Thu Mar 30 15:26:37 2017
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.ofbiz.base.start.Start.ServerState;
+import org.apache.ofbiz.base.util.Debug;
 
 /**
  * The StartupControlPanel controls OFBiz by executing high level
@@ -34,6 +35,8 @@ import org.apache.ofbiz.base.start.Start
  */
 final class StartupControlPanel {
 
+    public static final String module = StartupControlPanel.class.getName();
+
     /**
      * Initialize OFBiz by:
      * - setting high level JVM and OFBiz system properties
@@ -67,10 +70,27 @@ final class StartupControlPanel {
         createLogDirectoryIfMissing(config);
         createRuntimeShutdownHook(config, loaders, serverState);
         loadStartupLoaders(config, loaders, ofbizCommands, serverState);
+        printStartupMessage(config);
         executeShutdownAfterLoadIfConfigured(config, loaders, serverState, adminServer);
     }
 
     /**
+     * Print OFBiz startup message only if the OFBiz server is not scheduled for shutdown.
+     * @param config: contains parameters for system startup
+     */
+    private static void printStartupMessage(Config config) {
+        if (!config.shutdownAfterLoad) {
+            String lineSeparator = System.lineSeparator();
+            Debug.logInfo(  lineSeparator + "   ____  __________  _" +
+                            lineSeparator + "  / __ \\/ ____/ __ )(_)___" +
+                            lineSeparator + " / / / / /_  / __  / /_  /" +
+                            lineSeparator + "/ /_/ / __/ / /_/ / / / /_" +
+                            lineSeparator + "\\____/_/   /_____/_/ /___/  is started and ready." +
+                            lineSeparator, module);
+        }
+    }
+
+    /**
      * Shutdown the OFBiz server. This method is invoked in one of the
      * following ways:
      *