You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/12/22 13:36:17 UTC

[camel] branch main updated (2e44696 -> b07280b)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 2e44696  Remove unusued constant
     new 241f717  CAMEL-17236: camel-core - Remove classic startup summary level
     new b07280b  CAMEL-17236: camel-core - Remove classic startup summary level

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/camel/spring/xml/camelContext.json  |  2 +-
 .../java/org/apache/camel/StartupSummaryLevel.java |  2 -
 .../apache/camel/catalog/RuntimeCamelCatalog.java  |  1 -
 .../camel/impl/engine/AbstractCamelContext.java    | 54 ++++------------------
 .../ROOT/pages/camel-3x-upgrade-guide-3_15.adoc    |  4 ++
 5 files changed, 14 insertions(+), 49 deletions(-)

[camel] 01/02: CAMEL-17236: camel-core - Remove classic startup summary level

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 241f7172d5d722e885f57171d92501d816a73d64
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Dec 22 14:30:25 2021 +0100

    CAMEL-17236: camel-core - Remove classic startup summary level
---
 .../java/org/apache/camel/StartupSummaryLevel.java |  2 -
 .../apache/camel/catalog/RuntimeCamelCatalog.java  |  1 -
 .../camel/impl/engine/AbstractCamelContext.java    | 54 ++++------------------
 .../ROOT/pages/camel-3x-upgrade-guide-3_15.adoc    |  4 ++
 4 files changed, 13 insertions(+), 48 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/StartupSummaryLevel.java b/core/camel-api/src/main/java/org/apache/camel/StartupSummaryLevel.java
index 8f20f6a..097ffa0 100644
--- a/core/camel-api/src/main/java/org/apache/camel/StartupSummaryLevel.java
+++ b/core/camel-api/src/main/java/org/apache/camel/StartupSummaryLevel.java
@@ -24,8 +24,6 @@ import javax.xml.bind.annotation.XmlEnum;
 @XmlEnum
 public enum StartupSummaryLevel {
 
-    @Deprecated
-    Classic,
     Verbose,
     Default,
     Brief,
diff --git a/core/camel-api/src/main/java/org/apache/camel/catalog/RuntimeCamelCatalog.java b/core/camel-api/src/main/java/org/apache/camel/catalog/RuntimeCamelCatalog.java
index d14a4c7..dec884f 100644
--- a/core/camel-api/src/main/java/org/apache/camel/catalog/RuntimeCamelCatalog.java
+++ b/core/camel-api/src/main/java/org/apache/camel/catalog/RuntimeCamelCatalog.java
@@ -22,7 +22,6 @@ import java.util.Map;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.StaticService;
 import org.apache.camel.component.extension.ComponentVerifierExtension;
-import org.apache.camel.spi.EndpointUriFactory;
 import org.apache.camel.spi.SendDynamicAware;
 
 /**
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 02aeae9..47f50f8 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -1226,7 +1226,7 @@ public abstract class AbstractCamelContext extends BaseService
             }
         }
 
-        if (startupSummaryLevel != StartupSummaryLevel.Classic && startupSummaryLevel != StartupSummaryLevel.Oneline
+        if (startupSummaryLevel != StartupSummaryLevel.Oneline
                 && startupSummaryLevel != StartupSummaryLevel.Off) {
             logRouteStopSummary(LoggingLevel.INFO);
         }
@@ -2717,8 +2717,8 @@ public abstract class AbstractCamelContext extends BaseService
 
         // init the route controller
         this.routeController = getRouteController();
-        if (startupSummaryLevel == StartupSummaryLevel.Classic || startupSummaryLevel == StartupSummaryLevel.Verbose) {
-            // classic/verbose startup should let route controller do the route startup logging
+        if (startupSummaryLevel == StartupSummaryLevel.Verbose) {
+            // verbose startup should let route controller do the route startup logging
             if (routeController.getLoggingLevel().ordinal() < LoggingLevel.INFO.ordinal()) {
                 routeController.setLoggingLevel(LoggingLevel.INFO);
             }
@@ -2726,8 +2726,8 @@ public abstract class AbstractCamelContext extends BaseService
 
         // init the shutdown strategy
         this.shutdownStrategy = getShutdownStrategy();
-        if (startupSummaryLevel == StartupSummaryLevel.Classic || startupSummaryLevel == StartupSummaryLevel.Verbose) {
-            // classic/verbose startup should let route controller do the route shutdown logging
+        if (startupSummaryLevel == StartupSummaryLevel.Verbose) {
+            // verbose startup should let route controller do the route shutdown logging
             if (shutdownStrategy != null && shutdownStrategy.getLoggingLevel().ordinal() < LoggingLevel.INFO.ordinal()) {
                 shutdownStrategy.setLoggingLevel(LoggingLevel.INFO);
             }
@@ -2917,10 +2917,7 @@ public abstract class AbstractCamelContext extends BaseService
     }
 
     protected void doStartContext() throws Exception {
-        if (startupSummaryLevel == StartupSummaryLevel.Classic) {
-            // classic was logging this at INFO level
-            LOG.info("Apache Camel {} ({}) is starting", getVersion(), getName());
-        } else if (LOG.isDebugEnabled()) {
+        if (LOG.isDebugEnabled()) {
             LOG.debug("Apache Camel {} ({}) is starting", getVersion(), getName());
         }
         vetoed = null;
@@ -2966,11 +2963,7 @@ public abstract class AbstractCamelContext extends BaseService
         logDuplicateComponents();
 
         // log startup summary
-        if (startupSummaryLevel == StartupSummaryLevel.Classic) {
-            logClassicStartSummary();
-        } else {
-            logStartSummary();
-        }
+        logStartSummary();
 
         // now Camel has been started/bootstrap is complete, then run cleanup to help free up memory etc
         for (BootstrapCloseable bootstrap : bootstraps) {
@@ -3025,29 +3018,6 @@ public abstract class AbstractCamelContext extends BaseService
 
     }
 
-    protected void logClassicStartSummary() {
-        if (LOG.isInfoEnabled()) {
-            // count how many routes are actually started
-            int started = 0;
-            for (Route route : getRoutes()) {
-                ServiceStatus status = getRouteStatus(route.getId());
-                if (status != null && status.isStarted()) {
-                    started++;
-                }
-            }
-
-            final Collection<Route> controlledRoutes = getRouteController().getControlledRoutes();
-            if (controlledRoutes.isEmpty()) {
-                LOG.info("Total {} routes, of which {} are started", getRoutes().size(), started);
-            } else {
-                LOG.info("Total {} routes, of which {} are started, and {} are managed by RouteController: {}",
-                        getRoutes().size(), started, controlledRoutes.size(),
-                        getRouteController().getClass().getName());
-            }
-            LOG.info("Apache Camel {} ({}) started in {}", getVersion(), getName(), TimeUtils.printDuration(stopWatch.taken()));
-        }
-    }
-
     protected void logStartSummary() {
         // supervising route controller should do their own startup log summary
         boolean supervised = getRouteController().isSupervising();
@@ -3366,7 +3336,7 @@ public abstract class AbstractCamelContext extends BaseService
         }
         shutdownServices(list, false);
 
-        if (startupSummaryLevel != StartupSummaryLevel.Classic && startupSummaryLevel != StartupSummaryLevel.Oneline
+        if (startupSummaryLevel != StartupSummaryLevel.Oneline
                 && startupSummaryLevel != StartupSummaryLevel.Off) {
             logRouteStopSummary(LoggingLevel.INFO);
         }
@@ -3452,13 +3422,7 @@ public abstract class AbstractCamelContext extends BaseService
         // stop the lazy created so they can be re-created on restart
         forceStopLazyInitialization();
 
-        if (startupSummaryLevel == StartupSummaryLevel.Classic) {
-            if (LOG.isInfoEnabled()) {
-                LOG.info("Apache Camel {} ({}) uptime {}", getVersion(), getName(), getUptime());
-                LOG.info("Apache Camel {} ({}) is shutdown in {}", getVersion(), getName(),
-                        TimeUtils.printDuration(stopWatch.taken()));
-            }
-        } else if (startupSummaryLevel != StartupSummaryLevel.Off) {
+        if (startupSummaryLevel != StartupSummaryLevel.Off) {
             if (LOG.isInfoEnabled()) {
                 String taken = TimeUtils.printDuration(stopWatch.taken());
                 LOG.info("Apache Camel {} ({}) shutdown in {} (uptime:{})", getVersion(), getName(), taken, getUptime());
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_15.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_15.adoc
index 0062670..0c7d3ae 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_15.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_15.adoc
@@ -10,6 +10,10 @@ from both 3.0 to 3.1 and 3.1 to 3.2.
 
 Added `getScheme` method to `org.apache.camel.spi.Resource`.
 
+=== camel-core
+
+Removed the deprecated `Classic` value from `startupSummaryLevel` enums.
+
 === camel-endpointdsl
 
 The Endpoint DSL is now more type-safe, where previously an option would be declared as `Object` type,

[camel] 02/02: CAMEL-17236: camel-core - Remove classic startup summary level

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b07280bd73fdf3767ef1753d6e4a692a386bcb7a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Dec 22 14:32:04 2021 +0100

    CAMEL-17236: camel-core - Remove classic startup summary level
---
 .../generated/resources/org/apache/camel/spring/xml/camelContext.json   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json b/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
index 72f27e7..69c3078 100644
--- a/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
+++ b/components/camel-spring-xml/src/generated/resources/org/apache/camel/spring/xml/camelContext.json
@@ -12,7 +12,7 @@
   },
   "properties": {
     "depends-on": { "kind": "attribute", "displayName": "Depends On", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "List of other bean id's this CamelContext depends up. Multiple bean id's can be separated by comma." },
-    "startupSummaryLevel": { "kind": "attribute", "displayName": "Startup Summary Level", "required": false, "type": "enum", "javaType": "org.apache.camel.StartupSummaryLevel", "enum": [ "brief", "classic", "default", "off", "oneline", "verbose" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Default", "description": "Controls the level of information logged during startup (and shutdown) of CamelContext." },
+    "startupSummaryLevel": { "kind": "attribute", "displayName": "Startup Summary Level", "required": false, "type": "enum", "javaType": "org.apache.camel.StartupSummaryLevel", "enum": [ "brief", "default", "off", "oneline", "verbose" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Default", "description": "Controls the level of information logged during startup (and shutdown) of CamelContext." },
     "trace": { "kind": "attribute", "displayName": "Trace", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets whether tracing is enabled or not. To use tracing then this must be enabled on startup to be installed in the CamelContext." },
     "backlogTrace": { "kind": "attribute", "displayName": "Backlog Trace", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets whether backlog tracing is enabled or not. To use backlog tracing then this must be enabled on startup to be installed in the CamelContext." },
     "tracePattern": { "kind": "attribute", "displayName": "Trace Pattern", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Tracing pattern to match which node EIPs to trace. For example to match all To EIP nodes, use to. The pattern matches by node and route id's Multiple patterns can be separated by comma." },