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/01/24 15:10:03 UTC

[camel] branch master updated (edbc9e8 -> 3c45f2f)

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

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


    from edbc9e8  Sync deps
     new 30c9926  CAMEL-16072: Nicer log summary of startup and shutdown of Camel
     new 3c45f2f  CAMEL-16072: Nicer log summary of startup and shutdown of Camel

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:
 .../main/camel-main-configuration-metadata.json    |   2 +-
 .../org/apache/camel/catalog/others.properties     |   1 +
 .../camel/catalog/others/flight-recorder.json      |   8 +-
 .../camel/cdi/xml/CamelContextFactoryBean.java     |  14 ++
 .../org/apache/camel/spring/camelContext.json      |   1 +
 .../camel/spring/CamelContextFactoryBean.java      |  15 ++
 .../resources/org/apache/camel/jaxb.index          |   1 +
 .../main/java/org/apache/camel/CamelContext.java   |  10 ++
 .../org/apache/camel/CamelContextLifecycle.java    |  15 +-
 ...nverterExists.java => StartupSummaryLevel.java} |  12 +-
 .../java/org/apache/camel/spi/RouteController.java |  16 +-
 .../org/apache/camel/spi/ShutdownStrategy.java     |  13 ++
 .../camel/spi/SupervisingRouteController.java      |   6 +
 .../camel/impl/engine/AbstractCamelContext.java    | 174 +++++++++++++++++++--
 .../camel/impl/engine/DefaultRouteController.java  |  15 +-
 .../camel/impl/engine/DefaultShutdownStrategy.java |  52 ++++--
 .../engine/DefaultSupervisingRouteController.java  |   6 +
 .../camel/impl/engine/InternalRouteController.java |   9 +-
 .../impl/engine/InternalRouteStartupManager.java   |   2 +-
 .../camel/impl/ExtendedCamelContextConfigurer.java |   6 +
 .../camel/impl/lw/LightweightCamelContext.java     |  11 ++
 .../impl/lw/LightweightRuntimeCamelContext.java    |  22 ++-
 .../org/apache/camel/core/xml/routeController.json |   1 +
 .../core/xml/AbstractCamelContextFactoryBean.java  |  10 ++
 .../core/xml/CamelRouteControllerDefinition.java   |  15 ++
 .../impl/ShutdownGracefulTimeoutTriggerTest.java   |   2 +-
 .../processor/RouteStartupLoggingLevelTest.java    |   2 +-
 .../MainConfigurationPropertiesConfigurer.java     |  18 ++-
 .../camel-main-configuration-metadata.json         |   3 +-
 core/camel-main/src/main/docs/main.adoc            |   3 +-
 .../org/apache/camel/main/BaseMainSupport.java     |  14 +-
 .../camel/main/DefaultConfigurationConfigurer.java |   7 +-
 .../camel/main/DefaultConfigurationProperties.java |  70 +++++++--
 .../main/MainSupervisingRouteControllerTest.java   |   5 +-
 .../management/mbean/ManagedRouteController.java   |   2 +-
 .../mbean/ManagedSupervisingRouteController.java   |   2 +-
 docs/components/modules/others/pages/main.adoc     |   2 +-
 37 files changed, 485 insertions(+), 82 deletions(-)
 copy components/camel-jfr/src/generated/resources/jfr.json => catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/flight-recorder.json (55%)
 copy core/camel-api/src/main/java/org/apache/camel/{TypeConverterExists.java => StartupSummaryLevel.java} (82%)


[camel] 01/02: CAMEL-16072: Nicer log summary of startup and shutdown of Camel

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

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

commit 30c9926c5d04214c850dc277706fe1977c8f48eb
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jan 24 15:49:42 2021 +0100

    CAMEL-16072: Nicer log summary of startup and shutdown of Camel
---
 .../main/camel-main-configuration-metadata.json    |   2 +-
 .../org/apache/camel/catalog/others.properties     |   1 +
 .../camel/catalog/others/flight-recorder.json      |  15 ++
 .../main/java/org/apache/camel/CamelContext.java   |  10 ++
 .../org/apache/camel/CamelContextLifecycle.java    |  15 +-
 .../org/apache/camel/StartupSummaryLevel.java}     |  20 +--
 .../java/org/apache/camel/spi/RouteController.java |  16 +-
 .../org/apache/camel/spi/ShutdownStrategy.java     |  13 ++
 .../camel/spi/SupervisingRouteController.java      |   6 +
 .../camel/impl/engine/AbstractCamelContext.java    | 174 +++++++++++++++++++--
 .../camel/impl/engine/DefaultRouteController.java  |  15 +-
 .../camel/impl/engine/DefaultShutdownStrategy.java |  52 ++++--
 .../engine/DefaultSupervisingRouteController.java  |   6 +
 .../camel/impl/engine/InternalRouteController.java |   9 +-
 .../impl/engine/InternalRouteStartupManager.java   |   2 +-
 .../camel/impl/ExtendedCamelContextConfigurer.java |   6 +
 .../camel/impl/lw/LightweightCamelContext.java     |  11 ++
 .../impl/lw/LightweightRuntimeCamelContext.java    |  22 ++-
 .../impl/ShutdownGracefulTimeoutTriggerTest.java   |   2 +-
 .../processor/RouteStartupLoggingLevelTest.java    |   2 +-
 .../MainConfigurationPropertiesConfigurer.java     |  18 ++-
 .../camel-main-configuration-metadata.json         |   3 +-
 core/camel-main/src/main/docs/main.adoc            |   3 +-
 .../org/apache/camel/main/BaseMainSupport.java     |  14 +-
 .../camel/main/DefaultConfigurationConfigurer.java |   7 +-
 .../camel/main/DefaultConfigurationProperties.java |  70 +++++++--
 .../main/MainSupervisingRouteControllerTest.java   |   5 +-
 .../management/mbean/ManagedRouteController.java   |   2 +-
 .../mbean/ManagedSupervisingRouteController.java   |   2 +-
 docs/components/modules/others/pages/main.adoc     |   2 +-
 30 files changed, 442 insertions(+), 83 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 7e90a22..7e0ddef 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -57,7 +57,7 @@
     { "name": "camel.main.routeControllerExcludeRoutes", "description": "Pattern for filtering routes to be excluded as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to exclude all JMS routes, you can say jms:. And to exclude routes with specific route ids mySpecialRoute,myOtherSpecialRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPatter [...]
     { "name": "camel.main.routeControllerIncludeRoutes", "description": "Pattern for filtering routes to be included as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to include all kafka routes, you can say kafka:. And to include routes with specific route ids myRoute,myOtherRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern.", "sour [...]
     { "name": "camel.main.routeControllerInitialDelay", "description": "Initial delay in milli seconds before the route controller starts, after CamelContext has been started.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "long" },
-    { "name": "camel.main.routeControllerRouteStartupLoggingLevel", "description": "Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this to change the level for example to OFF if this kind of logging is not wanted.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.LoggingLevel", "defaultValue": "INFO", "enum": [ "ERROR", "WARN", "INFO", "DEBUG", "TRACE", "OFF" ] },
+    { "name": "camel.main.routeControllerLoggingLevel", "description": "Sets the logging level used for logging route activity (such as starting and stopping routes). The default logging level is DEBUG.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.LoggingLevel", "defaultValue": "DEBUG", "enum": [ "ERROR", "WARN", "INFO", "DEBUG", "TRACE", "OFF" ] },
     { "name": "camel.main.routeControllerSuperviseEnabled", "description": "To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner. This can be used when you want to startup Camel despite a route may otherwise fail fast during startup and cause Camel to fail to startup as well. By delegating the route startup to the supervising route controller then its manages the startup using a background th [...]
     { "name": "camel.main.routeControllerThreadPoolSize", "description": "The number of threads used by the route controller scheduled thread pool that are used for restarting routes. The pool uses 1 thread by default, but you can increase this to allow the controller to concurrently attempt to restart multiple routes in case more than one route has problems starting.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" },
     { "name": "camel.main.routeControllerUnhealthyOnExhausted", "description": "Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. The default is false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
index 6c64234..47e9091 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
@@ -5,6 +5,7 @@ csimple-joor
 cxf-transport
 elytron
 etcd3
+flight-recorder
 headersmap
 hystrix
 jasypt
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/flight-recorder.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/flight-recorder.json
new file mode 100644
index 0000000..8552d44
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/flight-recorder.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "flight-recorder",
+    "title": "Java Flight Recorder",
+    "description": "Diagnose Camel with Java Flight Recorder",
+    "deprecated": false,
+    "firstVersion": "3.8.0",
+    "label": "monitoring",
+    "supportLevel": "Preview",
+    "groupId": "org.apache.camel",
+    "artifactId": "camel-flight-recorder",
+    "version": "3.8.0-SNAPSHOT"
+  }
+}
diff --git a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
index 854ab6a..44b31ed 100644
--- a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
+++ b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
@@ -1257,4 +1257,14 @@ public interface CamelContext extends CamelContextLifecycle, RuntimeConfiguratio
      */
     SSLContextParameters getSSLContextParameters();
 
+    /**
+     * Controls the level of information logged during startup (and shutdown) of {@link CamelContext}.
+     */
+    void setStartupSummaryLevel(StartupSummaryLevel startupSummaryLevel);
+
+    /**
+     * Controls the level of information logged during startup (and shutdown) of {@link CamelContext}.
+     */
+    StartupSummaryLevel getStartupSummaryLevel();
+
 }
diff --git a/core/camel-api/src/main/java/org/apache/camel/CamelContextLifecycle.java b/core/camel-api/src/main/java/org/apache/camel/CamelContextLifecycle.java
index 8afffd0..4bcef1b 100644
--- a/core/camel-api/src/main/java/org/apache/camel/CamelContextLifecycle.java
+++ b/core/camel-api/src/main/java/org/apache/camel/CamelContextLifecycle.java
@@ -25,7 +25,7 @@ public interface CamelContextLifecycle extends AutoCloseable {
      * Starts the {@link CamelContext} (<b>important:</b> the start method is not blocked, see more details
      * <a href="http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html">here</a>)</li>.
      * <p/>
-     * See more details at the class-level javadoc of this class.
+     * See more details at the class-level javadoc at {@link CamelContext}.
      *
      * @throws RuntimeCamelException is thrown if starting failed
      */
@@ -35,7 +35,7 @@ public interface CamelContextLifecycle extends AutoCloseable {
      * Stop and shutdown the {@link CamelContext} (will stop all routes/components/endpoints etc and clear internal
      * state/cache).
      * <p/>
-     * See more details at the class-level javadoc of this class.
+     * See more details at the class-level javadoc at {@link CamelContext}.
      *
      * @throws RuntimeCamelException is thrown if stopping failed
      */
@@ -91,8 +91,17 @@ public interface CamelContextLifecycle extends AutoCloseable {
      */
     boolean isRunAllowed();
 
+    /**
+     * Builds the CamelContext.
+     *
+     * This phase is intended for frameworks or runtimes that are capable of performing build-time optimizations such as
+     * with camel-quarkus.
+     */
     void build();
 
+    /**
+     * Initializes the CamelContext.
+     */
     void init();
 
     /**
@@ -107,6 +116,8 @@ public interface CamelContextLifecycle extends AutoCloseable {
 
     /**
      * Shutdown the CamelContext, which means it cannot be started again.
+     * <p/>
+     * See more details at the class-level javadoc at {@link CamelContext}.
      */
     void shutdown();
 
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RouteStartupLoggingLevelTest.java b/core/camel-api/src/main/java/org/apache/camel/StartupSummaryLevel.java
similarity index 65%
copy from core/camel-core/src/test/java/org/apache/camel/processor/RouteStartupLoggingLevelTest.java
copy to core/camel-api/src/main/java/org/apache/camel/StartupSummaryLevel.java
index e5fd653..3b88a67 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RouteStartupLoggingLevelTest.java
+++ b/core/camel-api/src/main/java/org/apache/camel/StartupSummaryLevel.java
@@ -14,17 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.processor;
+package org.apache.camel;
 
-import org.apache.camel.CamelContext;
-import org.apache.camel.LoggingLevel;
+/**
+ * Controls the level of information logged during startup (and shutdown) of {@link CamelContext}.
+ */
+public enum StartupSummaryLevel {
 
-public class RouteStartupLoggingLevelTest extends SimpleMockTest {
+    Classic,
+    Verbose,
+    Default,
+    Brief,
+    Off
 
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        CamelContext context = super.createCamelContext();
-        context.getRouteController().setRouteStartupLoggingLevel(LoggingLevel.WARN);
-        return context;
-    }
 }
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/RouteController.java b/core/camel-api/src/main/java/org/apache/camel/spi/RouteController.java
index f78c33b..b22812f 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/RouteController.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/RouteController.java
@@ -31,15 +31,21 @@ import org.apache.camel.StaticService;
 public interface RouteController extends CamelContextAware, StaticService {
 
     /**
-     * Gets the logging level used for logging route startup activity.
+     * Gets the logging level used for logging route activity (such as starting and stopping routes). The default
+     * logging level is DEBUG.
      */
-    LoggingLevel getRouteStartupLoggingLevel();
+    LoggingLevel getLoggingLevel();
 
     /**
-     * Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this
-     * to change the level for example to OFF if this kind of logging is not wanted.
+     * Sets the logging level used for logging route activity (such as starting and stopping routes). The default
+     * logging level is DEBUG.
      */
-    void setRouteStartupLoggingLevel(LoggingLevel loggingLevel);
+    void setLoggingLevel(LoggingLevel loggingLevel);
+
+    /**
+     * Whether this route controller is a regular or supervising controller.
+     */
+    boolean isSupervising();
 
     /**
      * Enables supervising {@link RouteController}.
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/ShutdownStrategy.java b/core/camel-api/src/main/java/org/apache/camel/spi/ShutdownStrategy.java
index 87c2aca..183161f 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/ShutdownStrategy.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/ShutdownStrategy.java
@@ -20,6 +20,7 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.LoggingLevel;
 import org.apache.camel.Service;
 import org.apache.camel.StaticService;
 
@@ -242,4 +243,16 @@ public interface ShutdownStrategy extends StaticService {
      */
     boolean hasTimeoutOccurred();
 
+    /**
+     * Gets the logging level used for logging shutdown activity (such as starting and stopping routes). The default
+     * logging level is DEBUG.
+     */
+    LoggingLevel getLoggingLevel();
+
+    /**
+     * Sets the logging level used for logging shutdown activity (such as starting and stopping routes). The default
+     * logging level is DEBUG.
+     */
+    void setLoggingLevel(LoggingLevel loggingLevel);
+
 }
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java b/core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java
index 0011d65..dabd4ed 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java
@@ -17,6 +17,7 @@
 package org.apache.camel.spi;
 
 import java.util.Collection;
+import java.util.Set;
 
 import org.apache.camel.Route;
 import org.apache.camel.util.backoff.BackOffTimer;
@@ -140,6 +141,11 @@ public interface SupervisingRouteController extends RouteController {
     Collection<Route> getExhaustedRoutes();
 
     /**
+     * Returns the route ids of routes which are non controlled (such as routes that was excluded)
+     */
+    Set<String> getNonControlledRouteIds();
+
+    /**
      * Gets the state of the backoff for the given route if its managed and under restarting.
      *
      * @param  routeId the route id
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 8fe876d..e56b877 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
@@ -56,6 +56,7 @@ import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.FluentProducerTemplate;
 import org.apache.camel.GlobalEndpointConfiguration;
 import org.apache.camel.IsSingleton;
+import org.apache.camel.LoggingLevel;
 import org.apache.camel.NoSuchEndpointException;
 import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
@@ -70,6 +71,7 @@ import org.apache.camel.ShutdownRoute;
 import org.apache.camel.ShutdownRunningTask;
 import org.apache.camel.StartupListener;
 import org.apache.camel.StartupStep;
+import org.apache.camel.StartupSummaryLevel;
 import org.apache.camel.Suspendable;
 import org.apache.camel.SuspendableService;
 import org.apache.camel.TypeConverter;
@@ -317,8 +319,8 @@ public abstract class AbstractCamelContext extends BaseService
     private long buildTaken;
     private long initTaken;
     private long startDate;
-
     private SSLContextParameters sslContextParameters;
+    private StartupSummaryLevel startupSummaryLevel = StartupSummaryLevel.Default;
 
     /**
      * Creates the {@link CamelContext} using {@link org.apache.camel.support.DefaultRegistry} as registry.
@@ -2063,9 +2065,7 @@ public abstract class AbstractCamelContext extends BaseService
             logListeners = new LinkedHashSet<>();
         }
         // avoid adding double which can happen with spring xml on spring boot
-        if (!logListeners.contains(listener)) {
-            logListeners.add(listener);
-        }
+        logListeners.add(listener);
     }
 
     @Override
@@ -2603,6 +2603,21 @@ 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 (routeController.getLoggingLevel().ordinal() < LoggingLevel.INFO.ordinal()) {
+                routeController.setLoggingLevel(LoggingLevel.INFO);
+            }
+        }
+
+        // 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 (shutdownStrategy != null && shutdownStrategy.getLoggingLevel().ordinal() < LoggingLevel.INFO.ordinal()) {
+                shutdownStrategy.setLoggingLevel(LoggingLevel.INFO);
+            }
+        }
 
         // optimize - before starting routes lets check if event notifications is possible
         eventNotificationApplicable = EventHelper.eventsApplicable(this);
@@ -2771,7 +2786,10 @@ public abstract class AbstractCamelContext extends BaseService
     }
 
     protected void doStartContext() throws Exception {
-        if (LOG.isDebugEnabled()) {
+        if (startupSummaryLevel == StartupSummaryLevel.Classic) {
+            // classic was logging this at INFO level
+            LOG.info("Apache Camel {} ({}) is starting", getVersion(), getName());
+        } else if (LOG.isDebugEnabled()) {
             LOG.debug("Apache Camel {} ({}) is starting", getVersion(), getName());
         }
         vetoed = null;
@@ -2813,8 +2831,15 @@ public abstract class AbstractCamelContext extends BaseService
             }
         }
 
+        // ant duplicate components in use?
+        logDuplicateComponents();
+
         // log startup summary
-        logStartSummary();
+        if (startupSummaryLevel == StartupSummaryLevel.Classic) {
+            logClassicStartSummary();
+        } else {
+            logStartSummary();
+        }
 
         // now Camel has been started/bootstrap is complete, then run cleanup to help free up memory etc
         for (BootstrapCloseable bootstrap : bootstraps) {
@@ -2833,7 +2858,7 @@ public abstract class AbstractCamelContext extends BaseService
         }
     }
 
-    protected void logStartSummary() {
+    protected void logDuplicateComponents() {
         // output how many instances of the same component class are in use, as multiple instances is potential a mistake
         if (LOG.isInfoEnabled()) {
             Map<Class<?>, Set<String>> counters = new LinkedHashMap<>();
@@ -2862,6 +2887,9 @@ public abstract class AbstractCamelContext extends BaseService
             }
         }
 
+    }
+
+    protected void logClassicStartSummary() {
         if (LOG.isInfoEnabled()) {
             // count how many routes are actually started
             int started = 0;
@@ -2880,6 +2908,57 @@ public abstract class AbstractCamelContext extends BaseService
                         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();
+        if (!supervised && startupSummaryLevel != StartupSummaryLevel.Off && LOG.isInfoEnabled()) {
+            int started = 0;
+            int total = 0;
+            int disabled = 0;
+            List<String> lines = new ArrayList<>();
+            routeStartupOrder.sort(Comparator.comparingInt(RouteStartupOrder::getStartupOrder));
+            for (RouteStartupOrder order : routeStartupOrder) {
+                total++;
+                String id = order.getRoute().getRouteId();
+                String status = getRouteStatus(id).name();
+                if (ServiceStatus.Started.name().equals(status)) {
+                    started++;
+                }
+                // use basic endpoint uri to not log verbose details or potential sensitive data
+                String uri = order.getRoute().getEndpoint().getEndpointBaseUri();
+                uri = URISupport.sanitizeUri(uri);
+                lines.add(String.format("\t%s %s (%s)", status, id, uri));
+            }
+            for (Route route : routes) {
+                if (!route.isAutoStartup()) {
+                    total++;
+                    disabled++;
+                    String id = route.getRouteId();
+                    String status = getRouteStatus(id).name();
+                    if (ServiceStatus.Stopped.name().equals(status)) {
+                        status = "Disabled";
+                    }
+                    // use basic endpoint uri to not log verbose details or potential sensitive data
+                    String uri = route.getEndpoint().getEndpointBaseUri();
+                    uri = URISupport.sanitizeUri(uri);
+                    lines.add(String.format("\t%s %s (%s)", status, id, uri));
+                }
+            }
+            if (disabled > 0) {
+                LOG.info("Routes startup summary (total:{} started:{} disabled:{})", total, started, disabled);
+            } else {
+                LOG.info("Routes startup summary (total:{} started:{})", total, started);
+            }
+            // if we are default/verbose then log each route line
+            if (startupSummaryLevel == StartupSummaryLevel.Default || startupSummaryLevel == StartupSummaryLevel.Verbose) {
+                for (String line : lines) {
+                    LOG.info(line);
+                }
+            }
         }
 
         long taken = stopWatch.taken();
@@ -3058,7 +3137,14 @@ public abstract class AbstractCamelContext extends BaseService
     @Override
     protected void doStop() throws Exception {
         stopWatch.restart();
-        LOG.info("Apache Camel {} ({}) is shutting down", getVersion(), getName());
+
+        if (shutdownStrategy != null) {
+            long timeout = shutdownStrategy.getTimeUnit().toMillis(shutdownStrategy.getTimeout());
+            String to = TimeUtils.printDuration(timeout);
+            LOG.info("Apache Camel {} ({}) shutting down (timeout:{})", getVersion(), getName(), to);
+        } else {
+            LOG.info("Apache Camel {} ({}) shutting down", getVersion(), getName());
+        }
 
         EventHelper.notifyCamelContextStopping(this);
         EventHelper.notifyCamelContextRoutesStopping(this);
@@ -3098,6 +3184,11 @@ public abstract class AbstractCamelContext extends BaseService
             list.add(routeService);
         }
         shutdownServices(list, false);
+
+        if (startupSummaryLevel != StartupSummaryLevel.Classic && startupSummaryLevel != StartupSummaryLevel.Off) {
+            logRouteStopSummary();
+        }
+
         // do not clear route services or startup listeners as we can start
         // Camel again and get the route back as before
         routeStartupOrder.clear();
@@ -3178,10 +3269,17 @@ public abstract class AbstractCamelContext extends BaseService
         // stop the lazy created so they can be re-created on restart
         forceStopLazyInitialization();
 
-        if (LOG.isInfoEnabled()) {
-            LOG.info("Apache Camel {} ({}) uptime {}", getVersion(), getName(), getUptime());
-            LOG.info("Apache Camel {} ({}) is shutdown in {}", getVersion(), getName(),
-                    TimeUtils.printDuration(stopWatch.taken()));
+        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 (LOG.isInfoEnabled()) {
+                String taken = TimeUtils.printDuration(stopWatch.taken());
+                LOG.info("Apache Camel {} ({}) shutdown in {} (uptime:{})", getVersion(), getName(), taken, getUptime());
+            }
         }
 
         // ensure any recorder is stopped in case it was kept running
@@ -3195,6 +3293,48 @@ public abstract class AbstractCamelContext extends BaseService
         CamelContextTracker.notifyContextDestroyed(this);
     }
 
+    protected void logRouteStopSummary() {
+        if (LOG.isInfoEnabled()) {
+            int total = 0;
+            int stopped = 0;
+            int forced = 0;
+            List<String> lines = new ArrayList<>();
+
+            if (shutdownStrategy != null && shutdownStrategy.isShutdownRoutesInReverseOrder()) {
+                routeStartupOrder.sort(Comparator.comparingInt(RouteStartupOrder::getStartupOrder).reversed());
+            } else {
+                routeStartupOrder.sort(Comparator.comparingInt(RouteStartupOrder::getStartupOrder));
+            }
+            for (RouteStartupOrder order : routeStartupOrder) {
+                total++;
+                String id = order.getRoute().getRouteId();
+                String status = getRouteStatus(id).name();
+                if (ServiceStatus.Stopped.name().equals(status)) {
+                    stopped++;
+                }
+                if (order.getRoute().getProperties().containsKey("forcedShutdown")) {
+                    forced++;
+                    status = "Forced stopped";
+                }
+                // use basic endpoint uri to not log verbose details or potential sensitive data
+                String uri = order.getRoute().getEndpoint().getEndpointBaseUri();
+                uri = URISupport.sanitizeUri(uri);
+                lines.add(String.format("\t%s %s (%s)", status, id, uri));
+            }
+            if (forced > 0) {
+                LOG.info("Routes shutdown summary (total:{} stopped:{} forced:{})", total, stopped, forced);
+            } else {
+                LOG.info("Routes shutdown summary (total:{} stopped:{})", total, stopped);
+            }
+            // if we are default/verbose then log each route line
+            if (startupSummaryLevel == StartupSummaryLevel.Default || startupSummaryLevel == StartupSummaryLevel.Verbose) {
+                for (String line : lines) {
+                    LOG.info(line);
+                }
+            }
+        }
+    }
+
     public void startRouteDefinitions() throws Exception {
     }
 
@@ -4347,6 +4487,16 @@ public abstract class AbstractCamelContext extends BaseService
     }
 
     @Override
+    public StartupSummaryLevel getStartupSummaryLevel() {
+        return startupSummaryLevel;
+    }
+
+    @Override
+    public void setStartupSummaryLevel(StartupSummaryLevel startupSummaryLevel) {
+        this.startupSummaryLevel = startupSummaryLevel;
+    }
+
+    @Override
     public HeadersMapFactory getHeadersMapFactory() {
         return headersMapFactory;
     }
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRouteController.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRouteController.java
index 6373e6e..cdd0375 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRouteController.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRouteController.java
@@ -42,7 +42,7 @@ public class DefaultRouteController extends ServiceSupport implements RouteContr
 
     private CamelContext camelContext;
 
-    private LoggingLevel routeStartupLoggingLevel = LoggingLevel.INFO;
+    private LoggingLevel loggingLevel = LoggingLevel.DEBUG;
 
     public DefaultRouteController() {
         this(null);
@@ -67,13 +67,18 @@ public class DefaultRouteController extends ServiceSupport implements RouteContr
     }
 
     @Override
-    public LoggingLevel getRouteStartupLoggingLevel() {
-        return routeStartupLoggingLevel;
+    public LoggingLevel getLoggingLevel() {
+        return loggingLevel;
     }
 
     @Override
-    public void setRouteStartupLoggingLevel(LoggingLevel routeStartupLoggingLevel) {
-        this.routeStartupLoggingLevel = routeStartupLoggingLevel;
+    public void setLoggingLevel(LoggingLevel loggingLevel) {
+        this.loggingLevel = loggingLevel;
+    }
+
+    @Override
+    public boolean isSupervising() {
+        return this instanceof SupervisingRouteController;
     }
 
     // ***************************************************
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
index d0f82f2..bfa8ff2 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
@@ -38,12 +38,14 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.Consumer;
+import org.apache.camel.LoggingLevel;
 import org.apache.camel.Route;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.Service;
 import org.apache.camel.ShutdownRoute;
 import org.apache.camel.ShutdownRunningTask;
 import org.apache.camel.Suspendable;
+import org.apache.camel.spi.CamelLogger;
 import org.apache.camel.spi.InflightRepository;
 import org.apache.camel.spi.RouteStartupOrder;
 import org.apache.camel.spi.ShutdownAware;
@@ -114,6 +116,7 @@ import org.slf4j.LoggerFactory;
 public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownStrategy, CamelContextAware {
 
     private static final Logger LOG = LoggerFactory.getLogger(DefaultShutdownStrategy.class);
+    private final CamelLogger logger = new CamelLogger(LOG, LoggingLevel.DEBUG);
 
     private CamelContext camelContext;
     private ExecutorService executor;
@@ -195,12 +198,16 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
         List<RouteStartupOrder> routesOrdered = new ArrayList<>(routes);
         routesOrdered.sort(comparator);
 
-        if (suspendOnly) {
-            LOG.info("Starting to graceful suspend {} routes (timeout {} {})", routesOrdered.size(), timeout,
-                    timeUnit.toString().toLowerCase(Locale.ENGLISH));
-        } else {
-            LOG.info("Starting to graceful shutdown {} routes (timeout {} {})", routesOrdered.size(), timeout,
-                    timeUnit.toString().toLowerCase(Locale.ENGLISH));
+        if (logger.shouldLog()) {
+            if (suspendOnly) {
+                String msg = String.format("Starting to graceful suspend %s routes (timeout %s %s)", routesOrdered.size(),
+                        timeout, timeUnit.toString().toLowerCase(Locale.ENGLISH));
+                logger.log(msg);
+            } else {
+                String msg = String.format("Starting to graceful shutdown %s routes (timeout %s %s)", routesOrdered.size(),
+                        timeout, timeUnit.toString().toLowerCase(Locale.ENGLISH));
+                logger.log(msg);
+            }
         }
 
         // use another thread to perform the shutdowns so we can support timeout
@@ -265,8 +272,10 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
             currentShutdownTaskFuture = null;
         }
 
-        LOG.info("Graceful shutdown of {} routes completed in {}", routesOrdered.size(),
-                TimeUtils.printDuration(watch.taken()));
+        if (logger.shouldLog()) {
+            logger.log(String.format("Graceful shutdown of %s routes completed in %s", routesOrdered.size(),
+                    TimeUtils.printDuration(watch.taken())));
+        }
         return true;
     }
 
@@ -344,6 +353,16 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
     }
 
     @Override
+    public LoggingLevel getLoggingLevel() {
+        return logger.getLevel();
+    }
+
+    @Override
+    public void setLoggingLevel(LoggingLevel loggingLevel) {
+        this.logger.setLevel(loggingLevel);
+    }
+
+    @Override
     public CamelContext getCamelContext() {
         return camelContext;
     }
@@ -375,6 +394,8 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
                 order.getRoute().setShutdownRunningTask(ShutdownRunningTask.CompleteCurrentTaskOnly);
             }
 
+            order.getRoute().getProperties().put("forcedShutdown", true);
+
             // shutdown the route consumer
             shutdownNow(order.getRoute().getId(), order.getInput());
         }
@@ -610,7 +631,10 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
                     // use basic endpoint uri to not log verbose details or potential sensitive data
                     String uri = order.getRoute().getEndpoint().getEndpointBaseUri();
                     uri = URISupport.sanitizeUri(uri);
-                    LOG.info("Route: {} shutdown complete, was consuming from: {}", order.getRoute().getId(), uri);
+                    if (logger.shouldLog()) {
+                        logger.log(String.format("Route: %s shutdown complete, was consuming from: %s",
+                                order.getRoute().getId(), uri));
+                    }
                 } else {
                     // we will stop it later, but for now it must run to be able to help all inflight messages
                     // be safely completed
@@ -705,13 +729,19 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
                     // use basic endpoint uri to not log verbose details or potential sensitive data
                     String uri = deferred.getRoute().getEndpoint().getEndpointBaseUri();
                     uri = URISupport.sanitizeUri(uri);
-                    LOG.info("Route: {} suspend complete, was consuming from: {}", deferred.getRoute().getId(), uri);
+                    if (logger.shouldLog()) {
+                        logger.log(String.format("Route: %s suspend complete, was consuming from: %s",
+                                deferred.getRoute().getId(), uri));
+                    }
                 } else {
                     shutdownNow(deferred.getRoute().getId(), consumer);
                     // use basic endpoint uri to not log verbose details or potential sensitive data
                     String uri = deferred.getRoute().getEndpoint().getEndpointBaseUri();
                     uri = URISupport.sanitizeUri(uri);
-                    LOG.info("Route: {} shutdown complete, was consuming from: {}", deferred.getRoute().getId(), uri);
+                    if (logger.shouldLog()) {
+                        logger.log(String.format("Route: %s shutdown complete, was consuming from: %s",
+                                deferred.getRoute().getId(), uri));
+                    }
                 }
             }
 
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultSupervisingRouteController.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultSupervisingRouteController.java
index 83d6ac7..90df309 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultSupervisingRouteController.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultSupervisingRouteController.java
@@ -18,6 +18,7 @@ package org.apache.camel.impl.engine;
 
 import java.time.Duration;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -348,6 +349,11 @@ public class DefaultSupervisingRouteController extends DefaultRouteController im
     }
 
     @Override
+    public Set<String> getNonControlledRouteIds() {
+        return Collections.unmodifiableSet(nonSupervisedRoutes);
+    }
+
+    @Override
     public BackOffTimer.Task getRestartingRouteState(String routeId) {
         return routeManager.getBackOffContext(routeId).orElse(null);
     }
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteController.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteController.java
index d14001f..f7f7cc8 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteController.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteController.java
@@ -38,16 +38,21 @@ class InternalRouteController implements RouteController {
     }
 
     @Override
-    public LoggingLevel getRouteStartupLoggingLevel() {
+    public LoggingLevel getLoggingLevel() {
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public void setRouteStartupLoggingLevel(LoggingLevel loggingLevel) {
+    public void setLoggingLevel(LoggingLevel loggingLevel) {
         throw new UnsupportedOperationException();
     }
 
     @Override
+    public boolean isSupervising() {
+        return false;
+    }
+
+    @Override
     public SupervisingRouteController supervising() {
         throw new UnsupportedOperationException();
     }
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteStartupManager.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteStartupManager.java
index 02ed0e8..e03edbf 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteStartupManager.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteStartupManager.java
@@ -320,7 +320,7 @@ class InternalRouteStartupManager {
     }
 
     private LoggingLevel getRouteLoggerLogLevel() {
-        return abstractCamelContext.getRouteController().getRouteStartupLoggingLevel();
+        return abstractCamelContext.getRouteController().getLoggingLevel();
     }
 
     private void doStartOrResumeRouteConsumers(
diff --git a/core/camel-core-engine/src/generated/java/org/apache/camel/impl/ExtendedCamelContextConfigurer.java b/core/camel-core-engine/src/generated/java/org/apache/camel/impl/ExtendedCamelContextConfigurer.java
index 43a721e..339319e 100644
--- a/core/camel-core-engine/src/generated/java/org/apache/camel/impl/ExtendedCamelContextConfigurer.java
+++ b/core/camel-core-engine/src/generated/java/org/apache/camel/impl/ExtendedCamelContextConfigurer.java
@@ -149,6 +149,8 @@ public class ExtendedCamelContextConfigurer extends org.apache.camel.support.com
         case "ShutdownStrategy": target.setShutdownStrategy(property(camelContext, org.apache.camel.spi.ShutdownStrategy.class, value)); return true;
         case "startupsteprecorder":
         case "StartupStepRecorder": target.setStartupStepRecorder(property(camelContext, org.apache.camel.spi.StartupStepRecorder.class, value)); return true;
+        case "startupsummarylevel":
+        case "StartupSummaryLevel": target.setStartupSummaryLevel(property(camelContext, org.apache.camel.StartupSummaryLevel.class, value)); return true;
         case "streamcaching":
         case "StreamCaching": target.setStreamCaching(property(camelContext, java.lang.Boolean.class, value)); return true;
         case "streamcachingstrategy":
@@ -312,6 +314,8 @@ public class ExtendedCamelContextConfigurer extends org.apache.camel.support.com
         case "ShutdownStrategy": return org.apache.camel.spi.ShutdownStrategy.class;
         case "startupsteprecorder":
         case "StartupStepRecorder": return org.apache.camel.spi.StartupStepRecorder.class;
+        case "startupsummarylevel":
+        case "StartupSummaryLevel": return org.apache.camel.StartupSummaryLevel.class;
         case "streamcaching":
         case "StreamCaching": return java.lang.Boolean.class;
         case "streamcachingstrategy":
@@ -476,6 +480,8 @@ public class ExtendedCamelContextConfigurer extends org.apache.camel.support.com
         case "ShutdownStrategy": return target.getShutdownStrategy();
         case "startupsteprecorder":
         case "StartupStepRecorder": return target.getStartupStepRecorder();
+        case "startupsummarylevel":
+        case "StartupSummaryLevel": return target.getStartupSummaryLevel();
         case "streamcaching":
         case "StreamCaching": return target.isStreamCaching();
         case "streamcachingstrategy":
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java b/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
index 59e8480..8e9ed83 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightCamelContext.java
@@ -47,6 +47,7 @@ import org.apache.camel.ServiceStatus;
 import org.apache.camel.ShutdownRoute;
 import org.apache.camel.ShutdownRunningTask;
 import org.apache.camel.StartupListener;
+import org.apache.camel.StartupSummaryLevel;
 import org.apache.camel.TypeConverter;
 import org.apache.camel.ValueHolder;
 import org.apache.camel.builder.AdviceWithRouteBuilder;
@@ -926,6 +927,16 @@ public class LightweightCamelContext implements ExtendedCamelContext, CatalogCam
     }
 
     @Override
+    public void setStartupSummaryLevel(StartupSummaryLevel startupSummaryLevel) {
+        delegate.setStartupSummaryLevel(startupSummaryLevel);
+    }
+
+    @Override
+    public StartupSummaryLevel getStartupSummaryLevel() {
+        return delegate.getStartupSummaryLevel();
+    }
+
+    @Override
     public void setStreamCaching(Boolean cache) {
         delegate.setStreamCaching(cache);
     }
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightRuntimeCamelContext.java b/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightRuntimeCamelContext.java
index c99f0c8..bac7d62 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightRuntimeCamelContext.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/impl/lw/LightweightRuntimeCamelContext.java
@@ -56,6 +56,7 @@ import org.apache.camel.ServiceStatus;
 import org.apache.camel.ShutdownRoute;
 import org.apache.camel.ShutdownRunningTask;
 import org.apache.camel.StartupListener;
+import org.apache.camel.StartupSummaryLevel;
 import org.apache.camel.TypeConverter;
 import org.apache.camel.ValueHolder;
 import org.apache.camel.catalog.RuntimeCamelCatalog;
@@ -190,6 +191,7 @@ public class LightweightRuntimeCamelContext implements ExtendedCamelContext, Cat
     private final boolean logExhaustedMessageBody;
     private final String version;
     private Date startDate;
+    private StartupSummaryLevel startupSummaryLevel;
 
     LightweightRuntimeCamelContext(CamelContext reference, CamelContext context) {
         this.reference = reference;
@@ -231,6 +233,7 @@ public class LightweightRuntimeCamelContext implements ExtendedCamelContext, Cat
         allowUseOriginalMessage = context.isAllowUseOriginalMessage();
         logExhaustedMessageBody = context.isLogExhaustedMessageBody();
         version = context.getVersion();
+        startupSummaryLevel = context.getStartupSummaryLevel();
     }
 
     /**
@@ -1215,6 +1218,16 @@ public class LightweightRuntimeCamelContext implements ExtendedCamelContext, Cat
     }
 
     @Override
+    public void setStartupSummaryLevel(StartupSummaryLevel startupSummaryLevel) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public StartupSummaryLevel getStartupSummaryLevel() {
+        return startupSummaryLevel;
+    }
+
+    @Override
     public Endpoint getPrototypeEndpoint(String uri) {
         throw new UnsupportedOperationException();
     }
@@ -1852,16 +1865,21 @@ public class LightweightRuntimeCamelContext implements ExtendedCamelContext, Cat
     public RouteController getInternalRouteController() {
         return new RouteController() {
             @Override
-            public LoggingLevel getRouteStartupLoggingLevel() {
+            public LoggingLevel getLoggingLevel() {
                 throw new UnsupportedOperationException();
             }
 
             @Override
-            public void setRouteStartupLoggingLevel(LoggingLevel loggingLevel) {
+            public void setLoggingLevel(LoggingLevel loggingLevel) {
                 throw new UnsupportedOperationException();
             }
 
             @Override
+            public boolean isSupervising() {
+                return false;
+            }
+
+            @Override
             public SupervisingRouteController supervising() {
                 throw new UnsupportedOperationException();
             }
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/ShutdownGracefulTimeoutTriggerTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/ShutdownGracefulTimeoutTriggerTest.java
index cdacaa7..3cdf45a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/ShutdownGracefulTimeoutTriggerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/ShutdownGracefulTimeoutTriggerTest.java
@@ -33,7 +33,7 @@ public class ShutdownGracefulTimeoutTriggerTest extends ContextTestSupport {
         // timeout after 2 seconds
         context.getShutdownStrategy().setTimeout(2);
 
-        getMockEndpoint("mock:foo").expectedMessageCount(1);
+        getMockEndpoint("mock:foo").expectedMinimumMessageCount(1);
 
         template.sendBody("seda:foo", "A");
         template.sendBody("seda:foo", "B");
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RouteStartupLoggingLevelTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RouteStartupLoggingLevelTest.java
index e5fd653..5d26247 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RouteStartupLoggingLevelTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/RouteStartupLoggingLevelTest.java
@@ -24,7 +24,7 @@ public class RouteStartupLoggingLevelTest extends SimpleMockTest {
     @Override
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = super.createCamelContext();
-        context.getRouteController().setRouteStartupLoggingLevel(LoggingLevel.WARN);
+        context.getRouteController().setLoggingLevel(LoggingLevel.WARN);
         return context;
     }
 }
diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
index 63940e0..ca7cbbd 100644
--- a/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
+++ b/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
@@ -115,8 +115,8 @@ public class MainConfigurationPropertiesConfigurer extends org.apache.camel.supp
         case "RouteControllerIncludeRoutes": target.setRouteControllerIncludeRoutes(property(camelContext, java.lang.String.class, value)); return true;
         case "routecontrollerinitialdelay":
         case "RouteControllerInitialDelay": target.setRouteControllerInitialDelay(property(camelContext, long.class, value)); return true;
-        case "routecontrollerroutestartuplogginglevel":
-        case "RouteControllerRouteStartupLoggingLevel": target.setRouteControllerRouteStartupLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
+        case "routecontrollerlogginglevel":
+        case "RouteControllerLoggingLevel": target.setRouteControllerLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
         case "routecontrollersuperviseenabled":
         case "RouteControllerSuperviseEnabled": target.setRouteControllerSuperviseEnabled(property(camelContext, boolean.class, value)); return true;
         case "routecontrollerthreadpoolsize":
@@ -155,6 +155,8 @@ public class MainConfigurationPropertiesConfigurer extends org.apache.camel.supp
         case "StartupRecorderProfile": target.setStartupRecorderProfile(property(camelContext, java.lang.String.class, value)); return true;
         case "startuprecorderrecording":
         case "StartupRecorderRecording": target.setStartupRecorderRecording(property(camelContext, boolean.class, value)); return true;
+        case "startupsummarylevel":
+        case "StartupSummaryLevel": target.setStartupSummaryLevel(property(camelContext, org.apache.camel.StartupSummaryLevel.class, value)); return true;
         case "streamcachinganyspoolrules":
         case "StreamCachingAnySpoolRules": target.setStreamCachingAnySpoolRules(property(camelContext, boolean.class, value)); return true;
         case "streamcachingbuffersize":
@@ -294,8 +296,8 @@ public class MainConfigurationPropertiesConfigurer extends org.apache.camel.supp
         case "RouteControllerIncludeRoutes": return java.lang.String.class;
         case "routecontrollerinitialdelay":
         case "RouteControllerInitialDelay": return long.class;
-        case "routecontrollerroutestartuplogginglevel":
-        case "RouteControllerRouteStartupLoggingLevel": return org.apache.camel.LoggingLevel.class;
+        case "routecontrollerlogginglevel":
+        case "RouteControllerLoggingLevel": return org.apache.camel.LoggingLevel.class;
         case "routecontrollersuperviseenabled":
         case "RouteControllerSuperviseEnabled": return boolean.class;
         case "routecontrollerthreadpoolsize":
@@ -334,6 +336,8 @@ public class MainConfigurationPropertiesConfigurer extends org.apache.camel.supp
         case "StartupRecorderProfile": return java.lang.String.class;
         case "startuprecorderrecording":
         case "StartupRecorderRecording": return boolean.class;
+        case "startupsummarylevel":
+        case "StartupSummaryLevel": return org.apache.camel.StartupSummaryLevel.class;
         case "streamcachinganyspoolrules":
         case "StreamCachingAnySpoolRules": return boolean.class;
         case "streamcachingbuffersize":
@@ -474,8 +478,8 @@ public class MainConfigurationPropertiesConfigurer extends org.apache.camel.supp
         case "RouteControllerIncludeRoutes": return target.getRouteControllerIncludeRoutes();
         case "routecontrollerinitialdelay":
         case "RouteControllerInitialDelay": return target.getRouteControllerInitialDelay();
-        case "routecontrollerroutestartuplogginglevel":
-        case "RouteControllerRouteStartupLoggingLevel": return target.getRouteControllerRouteStartupLoggingLevel();
+        case "routecontrollerlogginglevel":
+        case "RouteControllerLoggingLevel": return target.getRouteControllerLoggingLevel();
         case "routecontrollersuperviseenabled":
         case "RouteControllerSuperviseEnabled": return target.isRouteControllerSuperviseEnabled();
         case "routecontrollerthreadpoolsize":
@@ -514,6 +518,8 @@ public class MainConfigurationPropertiesConfigurer extends org.apache.camel.supp
         case "StartupRecorderProfile": return target.getStartupRecorderProfile();
         case "startuprecorderrecording":
         case "StartupRecorderRecording": return target.isStartupRecorderRecording();
+        case "startupsummarylevel":
+        case "StartupSummaryLevel": return target.getStartupSummaryLevel();
         case "streamcachinganyspoolrules":
         case "StreamCachingAnySpoolRules": return target.isStreamCachingAnySpoolRules();
         case "streamcachingbuffersize":
diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 7e90a22..52e54cd 100644
--- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -57,7 +57,7 @@
     { "name": "camel.main.routeControllerExcludeRoutes", "description": "Pattern for filtering routes to be excluded as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to exclude all JMS routes, you can say jms:. And to exclude routes with specific route ids mySpecialRoute,myOtherSpecialRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPatter [...]
     { "name": "camel.main.routeControllerIncludeRoutes", "description": "Pattern for filtering routes to be included as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to include all kafka routes, you can say kafka:. And to include routes with specific route ids myRoute,myOtherRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern.", "sour [...]
     { "name": "camel.main.routeControllerInitialDelay", "description": "Initial delay in milli seconds before the route controller starts, after CamelContext has been started.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "long" },
-    { "name": "camel.main.routeControllerRouteStartupLoggingLevel", "description": "Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this to change the level for example to OFF if this kind of logging is not wanted.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.LoggingLevel", "defaultValue": "INFO", "enum": [ "ERROR", "WARN", "INFO", "DEBUG", "TRACE", "OFF" ] },
+    { "name": "camel.main.routeControllerLoggingLevel", "description": "Sets the logging level used for logging route activity (such as starting and stopping routes). The default logging level is DEBUG.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.LoggingLevel", "defaultValue": "DEBUG", "enum": [ "ERROR", "WARN", "INFO", "DEBUG", "TRACE", "OFF" ], "deprecated": true },
     { "name": "camel.main.routeControllerSuperviseEnabled", "description": "To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner. This can be used when you want to startup Camel despite a route may otherwise fail fast during startup and cause Camel to fail to startup as well. By delegating the route startup to the supervising route controller then its manages the startup using a background th [...]
     { "name": "camel.main.routeControllerThreadPoolSize", "description": "The number of threads used by the route controller scheduled thread pool that are used for restarting routes. The pool uses 1 thread by default, but you can increase this to allow the controller to concurrently attempt to restart multiple routes in case more than one route has problems starting.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" },
     { "name": "camel.main.routeControllerUnhealthyOnExhausted", "description": "Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. The default is false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
@@ -77,6 +77,7 @@
     { "name": "camel.main.startupRecorderMaxDepth", "description": "To filter our sub steps at a maximum depth. Use -1 for no maximum. Use 0 for no sub steps. Use 1 for max 1 sub step, and so forth. The default is -1.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": -1 },
     { "name": "camel.main.startupRecorderProfile", "description": "To use a specific Java Flight Recorder profile configuration, such as default or profile. The default is default.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String", "defaultValue": "default" },
     { "name": "camel.main.startupRecorderRecording", "description": "To enable Java Flight Recorder to start a recording and automatic dump the recording to disk after startup is complete. This requires that camel-jfr is on the classpath. The default is true.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true },
+    { "name": "camel.main.startupSummaryLevel", "description": "Controls the level of information logged during startup (and shutdown) of CamelContext.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "object", "javaType": "org.apache.camel.StartupSummaryLevel", "defaultValue": "Default" },
     { "name": "camel.main.streamCachingAnySpoolRules", "description": "Sets whether if just any of the org.apache.camel.spi.StreamCachingStrategy.SpoolRule rules returns true then shouldSpoolCache(long) returns true, to allow spooling to disk. If this option is false, then all the org.apache.camel.spi.StreamCachingStrategy.SpoolRule must return true. The default value is false which means that all the rules must return true.", "sourceType": "org.apache.camel.main.DefaultConfigurationProp [...]
     { "name": "camel.main.streamCachingBufferSize", "description": "Sets the stream caching buffer size to use when allocating in-memory buffers used for in-memory stream caches. The default size is 4096.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int" },
     { "name": "camel.main.streamCachingEnabled", "description": "Sets whether stream caching is enabled or not. Default is false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean" },
diff --git a/core/camel-main/src/main/docs/main.adoc b/core/camel-main/src/main/docs/main.adoc
index 6b9d236..e5a8888 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -69,7 +69,7 @@ The following table lists all the options:
 | *camel.main.routeController{zwsp}ExcludeRoutes* | Pattern for filtering routes to be excluded as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to exclude all JMS routes, you can say jms:. And to exclude routes with specific route ids mySpecialRoute,myOtherSpecialRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. |  | String
 | *camel.main.routeController{zwsp}IncludeRoutes* | Pattern for filtering routes to be included as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to include all kafka routes, you can say kafka:. And to include routes with specific route ids myRoute,myOtherRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. |  | String
 | *camel.main.routeController{zwsp}InitialDelay* | Initial delay in milli seconds before the route controller starts, after CamelContext has been started. |  | long
-| *camel.main.routeController{zwsp}RouteStartupLoggingLevel* | Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this to change the level for example to OFF if this kind of logging is not wanted. | INFO | LoggingLevel
+| *camel.main.routeController{zwsp}LoggingLevel* | Sets the logging level used for logging route activity (such as starting and stopping routes). The default logging level is DEBUG. | DEBUG | LoggingLevel
 | *camel.main.routeController{zwsp}SuperviseEnabled* | To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner. This can be used when you want to startup Camel despite a route may otherwise fail fast during startup and cause Camel to fail to startup as well. By delegating the route startup to the supervising route controller then its manages the startup using a background thread. The controller  [...]
 | *camel.main.routeController{zwsp}ThreadPoolSize* | The number of threads used by the route controller scheduled thread pool that are used for restarting routes. The pool uses 1 thread by default, but you can increase this to allow the controller to concurrently attempt to restart multiple routes in case more than one route has problems starting. |  | int
 | *camel.main.routeController{zwsp}UnhealthyOnExhausted* | Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. The default is false. |  | boolean
@@ -89,6 +89,7 @@ The following table lists all the options:
 | *camel.main.startupRecorderMax{zwsp}Depth* | To filter our sub steps at a maximum depth. Use -1 for no maximum. Use 0 for no sub steps. Use 1 for max 1 sub step, and so forth. The default is -1. | -1 | int
 | *camel.main.startupRecorder{zwsp}Profile* | To use a specific Java Flight Recorder profile configuration, such as default or profile. The default is default. | default | String
 | *camel.main.startupRecorder{zwsp}Recording* | To enable Java Flight Recorder to start a recording and automatic dump the recording to disk after startup is complete. This requires that camel-jfr is on the classpath. The default is true. | true | boolean
+| *camel.main.startupSummaryLevel* | Controls the level of information logged during startup (and shutdown) of CamelContext. | Default | StartupSummaryLevel
 | *camel.main.streamCachingAny{zwsp}SpoolRules* | Sets whether if just any of the org.apache.camel.spi.StreamCachingStrategy.SpoolRule rules returns true then shouldSpoolCache(long) returns true, to allow spooling to disk. If this option is false, then all the org.apache.camel.spi.StreamCachingStrategy.SpoolRule must return true. The default value is false which means that all the rules must return true. |  | boolean
 | *camel.main.streamCachingBuffer{zwsp}Size* | Sets the stream caching buffer size to use when allocating in-memory buffers used for in-memory stream caches. The default size is 4096. |  | int
 | *camel.main.streamCaching{zwsp}Enabled* | Sets whether stream caching is enabled or not. Default is false. |  | boolean
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index c3ea133..0bbc281 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -364,9 +364,17 @@ public abstract class BaseMainSupport extends BaseService {
                 locations
                         = lookupPropertyFromSysOrEnv(PROPERTY_PLACEHOLDER_LOCATION).orElse(defaultPropertyPlaceholderLocation);
             }
+            if (locations != null) {
+                locations = locations.trim();
+            }
             if (!Objects.equals(locations, "false")) {
                 pc.addLocation(locations);
-                LOG.info("Using properties from: {}", locations);
+                if (DEFAULT_PROPERTY_PLACEHOLDER_LOCATION.equals(locations)) {
+                    LOG.debug("Using properties from: {}", locations);
+                } else {
+                    // if not default location then log at INFO
+                    LOG.info("Using properties from: {}", locations);
+                }
             }
         }
 
@@ -431,7 +439,7 @@ public abstract class BaseMainSupport extends BaseService {
 
         // log summary of configurations
         if (mainConfigurationProperties.isAutoConfigurationLogSummary() && !autoConfiguredProperties.isEmpty()) {
-            LOG.info("Auto-configuration summary:");
+            LOG.info("Auto-configuration summary");
             autoConfiguredProperties.forEach((k, v) -> {
                 if (SensitiveUtils.containsSensitive(k)) {
                     LOG.info("\t{}=xxxxxx", k);
@@ -1263,7 +1271,7 @@ public abstract class BaseMainSupport extends BaseService {
             }
             // log summary of configurations
             if (mainConfigurationProperties.isAutoConfigurationLogSummary() && !autoConfiguredProperties.isEmpty()) {
-                LOG.info("Auto-configuration component {} summary:", name);
+                LOG.info("Auto-configuration component {} summary", name);
                 autoConfiguredProperties.forEach((k, v) -> {
                     if (SensitiveUtils.containsSensitive(k)) {
                         LOG.info("\t{}=xxxxxx", k);
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
index 6829fb7..aa9c6b9 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
@@ -127,6 +127,9 @@ public final class DefaultConfigurationConfigurer {
         if (config.getName() != null) {
             ecc.setName(config.getName());
         }
+        if (config.getStartupSummaryLevel() != null) {
+            camelContext.setStartupSummaryLevel(config.getStartupSummaryLevel());
+        }
 
         if (config.getShutdownTimeout() > 0) {
             camelContext.getShutdownStrategy().setTimeout(config.getShutdownTimeout());
@@ -245,8 +248,8 @@ public final class DefaultConfigurationConfigurer {
             }
             src.setUnhealthyOnExhausted(config.isRouteControllerUnhealthyOnExhausted());
         }
-        if (config.getRouteControllerRouteStartupLoggingLevel() != null) {
-            camelContext.getRouteController().setRouteStartupLoggingLevel(config.getRouteControllerRouteStartupLoggingLevel());
+        if (config.getRouteControllerLoggingLevel() != null) {
+            camelContext.getRouteController().setLoggingLevel(config.getRouteControllerLoggingLevel());
         }
     }
 
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index 1ec2f09..abcc616 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -16,9 +16,11 @@
  */
 package org.apache.camel.main;
 
+import org.apache.camel.CamelContext;
 import org.apache.camel.Experimental;
 import org.apache.camel.LoggingLevel;
 import org.apache.camel.ManagementStatisticsLevel;
+import org.apache.camel.StartupSummaryLevel;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.PatternHelper;
 
@@ -28,6 +30,8 @@ import org.apache.camel.support.PatternHelper;
 public abstract class DefaultConfigurationProperties<T> {
 
     private String name;
+    @Metadata(defaultValue = "Default")
+    private StartupSummaryLevel startupSummaryLevel;
     private int durationMaxSeconds;
     private int durationMaxIdleSeconds;
     private int durationMaxMessages;
@@ -87,8 +91,9 @@ public abstract class DefaultConfigurationProperties<T> {
     private String xmlRests = "classpath:camel-rest/*.xml";
     private boolean lightweight;
     // route controller
-    @Metadata(defaultValue = "INFO")
-    private LoggingLevel routeControllerRouteStartupLoggingLevel = LoggingLevel.INFO;
+    @Metadata(defaultValue = "DEBUG")
+    @Deprecated
+    private LoggingLevel routeControllerLoggingLevel;
     private boolean routeControllerSuperviseEnabled;
     private String routeControllerIncludeRoutes;
     private String routeControllerExcludeRoutes;
@@ -121,6 +126,17 @@ public abstract class DefaultConfigurationProperties<T> {
         this.name = name;
     }
 
+    public StartupSummaryLevel getStartupSummaryLevel() {
+        return startupSummaryLevel;
+    }
+
+    /**
+     * Controls the level of information logged during startup (and shutdown) of CamelContext.
+     */
+    public void setStartupSummaryLevel(StartupSummaryLevel startupSummaryLevel) {
+        this.startupSummaryLevel = startupSummaryLevel;
+    }
+
     public int getDurationMaxSeconds() {
         return durationMaxSeconds;
     }
@@ -942,16 +958,18 @@ public abstract class DefaultConfigurationProperties<T> {
         this.lightweight = lightweight;
     }
 
-    public LoggingLevel getRouteControllerRouteStartupLoggingLevel() {
-        return routeControllerRouteStartupLoggingLevel;
+    @Deprecated
+    public LoggingLevel getRouteControllerLoggingLevel() {
+        return routeControllerLoggingLevel;
     }
 
     /**
-     * Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this
-     * to change the level for example to OFF if this kind of logging is not wanted.
+     * Sets the logging level used for logging route activity (such as starting and stopping routes). The default
+     * logging level is DEBUG.
      */
-    public void setRouteControllerRouteStartupLoggingLevel(LoggingLevel routeControllerRouteStartupLoggingLevel) {
-        this.routeControllerRouteStartupLoggingLevel = routeControllerRouteStartupLoggingLevel;
+    @Deprecated
+    public void setRouteControllerLoggingLevel(LoggingLevel routeControllerLoggingLevel) {
+        this.routeControllerLoggingLevel = routeControllerLoggingLevel;
     }
 
     public boolean isRouteControllerSuperviseEnabled() {
@@ -1846,11 +1864,11 @@ public abstract class DefaultConfigurationProperties<T> {
     }
 
     /**
-     * Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this
-     * to change the level for example to OFF if this kind of logging is not wanted.
+     * Sets the logging level used for logging route activity (such as starting and stopping routes). The default
+     * logging level is DEBUG.
      */
-    public T withRouteStartupLoggingLevel(LoggingLevel routeStartupLoggingLevel) {
-        this.routeControllerRouteStartupLoggingLevel = routeStartupLoggingLevel;
+    public T withRouteControllerLoggingLevel(LoggingLevel routeControllerLoggingLevel) {
+        this.routeControllerLoggingLevel = routeControllerLoggingLevel;
         return (T) this;
     }
 
@@ -1929,6 +1947,34 @@ public abstract class DefaultConfigurationProperties<T> {
     }
 
     /**
+     * Pattern for filtering routes to be included as supervised.
+     *
+     * The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma.
+     *
+     * For example to include all kafka routes, you can say <tt>kafka:*</tt>. And to include routes with specific route
+     * ids <tt>myRoute,myOtherRoute</tt>. The pattern supports wildcards and uses the matcher from
+     * org.apache.camel.support.PatternHelper#matchPattern.
+     */
+    public T withRouteControllerIncludeRoutes(String routeControllerIncludeRoutes) {
+        this.routeControllerIncludeRoutes = routeControllerIncludeRoutes;
+        return (T) this;
+    }
+
+    /**
+     * Pattern for filtering routes to be excluded as supervised.
+     *
+     * The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma.
+     *
+     * For example to exclude all JMS routes, you can say <tt>jms:*</tt>. And to exclude routes with specific route ids
+     * <tt>mySpecialRoute,myOtherSpecialRoute</tt>. The pattern supports wildcards and uses the matcher from
+     * org.apache.camel.support.PatternHelper#matchPattern.
+     */
+    public T withRouteControllerExcludeRoutes(String routeControllerExcludeRoutes) {
+        this.routeControllerExcludeRoutes = routeControllerExcludeRoutes;
+        return (T) this;
+    }
+
+    /**
      * Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is
      * not successfully started and the route manager is giving up.
      *
diff --git a/core/camel-main/src/test/java/org/apache/camel/main/MainSupervisingRouteControllerTest.java b/core/camel-main/src/test/java/org/apache/camel/main/MainSupervisingRouteControllerTest.java
index b90c134..8211954 100644
--- a/core/camel-main/src/test/java/org/apache/camel/main/MainSupervisingRouteControllerTest.java
+++ b/core/camel-main/src/test/java/org/apache/camel/main/MainSupervisingRouteControllerTest.java
@@ -42,12 +42,13 @@ public class MainSupervisingRouteControllerTest {
         // lets make a simple route
         Main main = new Main();
         main.configure().addRoutesBuilder(new MyRoute());
-        main.configure().withRouteStartupLoggingLevel(LoggingLevel.OFF)
+        main.configure().withRouteControllerLoggingLevel(LoggingLevel.OFF)
                 .withRouteControllerSuperviseEnabled(true)
                 .withRouteControllerBackOffDelay(25)
                 .withRouteControllerBackOffMaxAttempts(3)
                 .withRouteControllerInitialDelay(100)
-                .withRouteControllerThreadPoolSize(2);
+                .withRouteControllerThreadPoolSize(2)
+                .withRouteControllerExcludeRoutes("timer*");
         main.start();
 
         MockEndpoint mock = main.getCamelContext().getEndpoint("mock:foo", MockEndpoint.class);
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRouteController.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRouteController.java
index f4c2cb5..7a040a1 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRouteController.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRouteController.java
@@ -59,7 +59,7 @@ public class ManagedRouteController extends ManagedService implements ManagedRou
     @Override
     public String getRouteStartupLoggingLevel() {
         if (controller != null) {
-            return controller.getRouteStartupLoggingLevel().name();
+            return controller.getLoggingLevel().name();
         } else {
             return null;
         }
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedSupervisingRouteController.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedSupervisingRouteController.java
index 8be2b7b..b914ade 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedSupervisingRouteController.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedSupervisingRouteController.java
@@ -134,7 +134,7 @@ public class ManagedSupervisingRouteController extends ManagedService implements
     @Override
     public String getRouteStartupLoggingLevel() {
         if (controller != null) {
-            return controller.getRouteStartupLoggingLevel().name();
+            return controller.getLoggingLevel().name();
         } else {
             return null;
         }
diff --git a/docs/components/modules/others/pages/main.adoc b/docs/components/modules/others/pages/main.adoc
index 1e33f95..6c2aef2 100644
--- a/docs/components/modules/others/pages/main.adoc
+++ b/docs/components/modules/others/pages/main.adoc
@@ -71,7 +71,7 @@ The following table lists all the options:
 | *camel.main.routeController{zwsp}ExcludeRoutes* | Pattern for filtering routes to be excluded as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to exclude all JMS routes, you can say jms:. And to exclude routes with specific route ids mySpecialRoute,myOtherSpecialRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. |  | String
 | *camel.main.routeController{zwsp}IncludeRoutes* | Pattern for filtering routes to be included as supervised. The pattern is matching on route id, and endpoint uri for the route. Multiple patterns can be separated by comma. For example to include all kafka routes, you can say kafka:. And to include routes with specific route ids myRoute,myOtherRoute. The pattern supports wildcards and uses the matcher from org.apache.camel.support.PatternHelper#matchPattern. |  | String
 | *camel.main.routeController{zwsp}InitialDelay* | Initial delay in milli seconds before the route controller starts, after CamelContext has been started. |  | long
-| *camel.main.routeController{zwsp}RouteStartupLoggingLevel* | Sets the logging level used for logging route startup activity. By default INFO level is used. You can use this to change the level for example to OFF if this kind of logging is not wanted. | INFO | LoggingLevel
+| *camel.main.routeController{zwsp}LoggingLevel* | Sets the logging level used for logging route activity (such as starting and stopping routes). The default logging level is DEBUG. | DEBUG | LoggingLevel
 | *camel.main.routeController{zwsp}SuperviseEnabled* | To enable using supervising route controller which allows Camel to startup and then the controller takes care of starting the routes in a safe manner. This can be used when you want to startup Camel despite a route may otherwise fail fast during startup and cause Camel to fail to startup as well. By delegating the route startup to the supervising route controller then its manages the startup using a background thread. The controller  [...]
 | *camel.main.routeController{zwsp}ThreadPoolSize* | The number of threads used by the route controller scheduled thread pool that are used for restarting routes. The pool uses 1 thread by default, but you can increase this to allow the controller to concurrently attempt to restart multiple routes in case more than one route has problems starting. |  | int
 | *camel.main.routeController{zwsp}UnhealthyOnExhausted* | Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. The default is false. |  | boolean


[camel] 02/02: CAMEL-16072: Nicer log summary of startup and shutdown of Camel

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

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

commit 3c45f2f34bd72741cf82e6400d19bd7015cc78b3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jan 24 16:09:08 2021 +0100

    CAMEL-16072: Nicer log summary of startup and shutdown of Camel
---
 .../org/apache/camel/cdi/xml/CamelContextFactoryBean.java | 14 ++++++++++++++
 .../resources/org/apache/camel/spring/camelContext.json   |  1 +
 .../org/apache/camel/spring/CamelContextFactoryBean.java  | 15 +++++++++++++++
 .../src/generated/resources/org/apache/camel/jaxb.index   |  1 +
 .../main/java/org/apache/camel/StartupSummaryLevel.java   |  3 +++
 .../org/apache/camel/core/xml/routeController.json        |  1 +
 .../camel/core/xml/AbstractCamelContextFactoryBean.java   | 10 ++++++++++
 .../camel/core/xml/CamelRouteControllerDefinition.java    | 15 +++++++++++++++
 8 files changed, 60 insertions(+)

diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java b/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
index 7488254..a71cda8 100644
--- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
+++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
@@ -34,6 +34,7 @@ import org.apache.camel.LoggingLevel;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.ShutdownRoute;
 import org.apache.camel.ShutdownRunningTask;
+import org.apache.camel.StartupSummaryLevel;
 import org.apache.camel.TypeConverterExists;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.core.xml.AbstractCamelContextFactoryBean;
@@ -80,6 +81,10 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Def
     private String dependsOn;
 
     @XmlAttribute
+    @Metadata(defaultValue = "Default")
+    private StartupSummaryLevel startupSummaryLevel;
+
+    @XmlAttribute
     private String trace;
 
     @XmlAttribute
@@ -646,6 +651,15 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Def
     }
 
     @Override
+    public StartupSummaryLevel getStartupSummaryLevel() {
+        return startupSummaryLevel;
+    }
+
+    public void setStartupSummaryLevel(StartupSummaryLevel startupSummaryLevel) {
+        this.startupSummaryLevel = startupSummaryLevel;
+    }
+
+    @Override
     public String getTrace() {
         return trace;
     }
diff --git a/components/camel-spring/src/generated/resources/org/apache/camel/spring/camelContext.json b/components/camel-spring/src/generated/resources/org/apache/camel/spring/camelContext.json
index 7c4e7ea..b57b615 100644
--- a/components/camel-spring/src/generated/resources/org/apache/camel/spring/camelContext.json
+++ b/components/camel-spring/src/generated/resources/org/apache/camel/spring/camelContext.json
@@ -12,6 +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", "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." },
diff --git a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
index a15737c..e91072e 100644
--- a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
+++ b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
@@ -34,6 +34,7 @@ import org.apache.camel.RoutesBuilder;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.ShutdownRoute;
 import org.apache.camel.ShutdownRunningTask;
+import org.apache.camel.StartupSummaryLevel;
 import org.apache.camel.TypeConverterExists;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.properties.PropertiesComponent;
@@ -108,6 +109,9 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Spr
     @Metadata(displayName = "Depends On")
     private String dependsOn;
     @XmlAttribute
+    @Metadata(defaultValue = "Default")
+    private StartupSummaryLevel startupSummaryLevel;
+    @XmlAttribute
     private String trace;
     @XmlAttribute
     private String backlogTrace;
@@ -758,6 +762,17 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Spr
         this.trace = trace;
     }
 
+    public StartupSummaryLevel getStartupSummaryLevel() {
+        return startupSummaryLevel;
+    }
+
+    /**
+     * Controls the level of information logged during startup (and shutdown) of CamelContext.
+     */
+    public void setStartupSummaryLevel(StartupSummaryLevel startupSummaryLevel) {
+        this.startupSummaryLevel = startupSummaryLevel;
+    }
+
     @Override
     public String getBacklogTrace() {
         return backlogTrace;
diff --git a/core/camel-api/src/generated/resources/org/apache/camel/jaxb.index b/core/camel-api/src/generated/resources/org/apache/camel/jaxb.index
index 3213777..6d9b86e 100644
--- a/core/camel-api/src/generated/resources/org/apache/camel/jaxb.index
+++ b/core/camel-api/src/generated/resources/org/apache/camel/jaxb.index
@@ -5,5 +5,6 @@ LoggingLevel
 ManagementStatisticsLevel
 ShutdownRoute
 ShutdownRunningTask
+StartupSummaryLevel
 TypeConverterExists
 WaitForTaskToComplete
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 3b88a67..449d803 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
@@ -16,9 +16,12 @@
  */
 package org.apache.camel;
 
+import javax.xml.bind.annotation.XmlEnum;
+
 /**
  * Controls the level of information logged during startup (and shutdown) of {@link CamelContext}.
  */
+@XmlEnum
 public enum StartupSummaryLevel {
 
     Classic,
diff --git a/core/camel-core-xml/src/generated/resources/org/apache/camel/core/xml/routeController.json b/core/camel-core-xml/src/generated/resources/org/apache/camel/core/xml/routeController.json
index 140da07..0280eb5 100644
--- a/core/camel-core-xml/src/generated/resources/org/apache/camel/core/xml/routeController.json
+++ b/core/camel-core-xml/src/generated/resources/org/apache/camel/core/xml/routeController.json
@@ -22,6 +22,7 @@
     "backOffMaxAttempts": { "kind": "attribute", "displayName": "Back Off Max Attempts", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Backoff maximum number of attempts to restart a route that failed to startup. When this threshold has been exceeded then the controller will give up attempting to restart the route, and the route will remain as stopped." },
     "backOffMultiplier": { "kind": "attribute", "displayName": "Back Off Multiplier", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1.0", "description": "Backoff multiplier to use for exponential backoff. This is used to extend the delay between restart attempts." },
     "unhealthyOnExhausted": { "kind": "attribute", "displayName": "Unhealthy On Exhausted", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about t [...]
+    "loggingLevel": { "kind": "attribute", "displayName": "Logging Level", "required": false, "type": "enum", "javaType": "org.apache.camel.LoggingLevel", "enum": [ "DEBUG", "ERROR", "INFO", "OFF", "TRACE", "WARN" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEBUG", "description": "Sets the logging level used for logging route activity (such as starting and stopping routes). The default logging level is DEBUG." },
     "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }
   }
 }
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 66228f8..f0f844f 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -38,6 +38,7 @@ import org.apache.camel.ManagementStatisticsLevel;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.ShutdownRoute;
 import org.apache.camel.ShutdownRunningTask;
+import org.apache.camel.StartupSummaryLevel;
 import org.apache.camel.TypeConverterExists;
 import org.apache.camel.TypeConverters;
 import org.apache.camel.ValueHolder;
@@ -741,6 +742,10 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
         if (unhealthyOnExhausted != null && unhealthyOnExhausted) {
             src.setUnhealthyOnExhausted(unhealthyOnExhausted);
         }
+        LoggingLevel loggingLevel = CamelContextHelper.parse(getContext(), LoggingLevel.class, rc.getLoggingLevel());
+        if (loggingLevel != null) {
+            src.setLoggingLevel(loggingLevel);
+        }
     }
 
     protected void initPropertyPlaceholder() throws Exception {
@@ -883,6 +888,8 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
 
     public abstract CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder();
 
+    public abstract StartupSummaryLevel getStartupSummaryLevel();
+
     public abstract String getTrace();
 
     public abstract String getTracePattern();
@@ -999,6 +1006,9 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
      * @throws Exception is thrown if error occurred
      */
     protected void initCamelContext(T context) throws Exception {
+        if (getStartupSummaryLevel() != null) {
+            context.setStartupSummaryLevel(getStartupSummaryLevel());
+        }
         if (getBeanPostProcessorEnabled() != null) {
             CamelBeanPostProcessor cbpp = context.adapt(ExtendedCamelContext.class).getBeanPostProcessor();
             if (cbpp != null) {
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelRouteControllerDefinition.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelRouteControllerDefinition.java
index e3d910f..b4fda97 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelRouteControllerDefinition.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/CamelRouteControllerDefinition.java
@@ -59,6 +59,9 @@ public class CamelRouteControllerDefinition extends IdentifiedType {
     @XmlAttribute
     @Metadata(defaultValue = "false")
     private String unhealthyOnExhausted;
+    @XmlAttribute
+    @Metadata(javaType = "org.apache.camel.LoggingLevel", defaultValue = "DEBUG", enums = "TRACE,DEBUG,INFO,WARN,ERROR,OFF")
+    private String loggingLevel;
 
     public String getSupervising() {
         return supervising;
@@ -205,4 +208,16 @@ public class CamelRouteControllerDefinition extends IdentifiedType {
     public void setUnhealthyOnExhausted(String unhealthyOnExhausted) {
         this.unhealthyOnExhausted = unhealthyOnExhausted;
     }
+
+    public String getLoggingLevel() {
+        return loggingLevel;
+    }
+
+    /**
+     * Sets the logging level used for logging route activity (such as starting and stopping routes). The default
+     * logging level is DEBUG.
+     */
+    public void setLoggingLevel(String loggingLevel) {
+        this.loggingLevel = loggingLevel;
+    }
 }