CAMEL-11582: SupervisingRouteController should have better INFO logging on startup
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a25eb775 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a25eb775 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a25eb775 Branch: refs/heads/master Commit: a25eb7753ab3a3e03add7455d45e4c1fadb7ab1b Parents: 04f0706 Author: lburgazzoli <lburgazz...@gmail.com> Authored: Mon Aug 7 08:59:26 2017 +0200 Committer: lburgazzoli <lburgazz...@gmail.com> Committed: Tue Aug 8 13:29:28 2017 +0200 ---------------------------------------------------------------------- .../org/apache/camel/impl/SupervisingRouteController.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/a25eb775/camel-core/src/main/java/org/apache/camel/impl/SupervisingRouteController.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/impl/SupervisingRouteController.java b/camel-core/src/main/java/org/apache/camel/impl/SupervisingRouteController.java index 669532e..01396dc 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/SupervisingRouteController.java +++ b/camel-core/src/main/java/org/apache/camel/impl/SupervisingRouteController.java @@ -335,6 +335,12 @@ public class SupervisingRouteController extends DefaultRouteController { // ignored, exception handled by startRoute } } + + LOGGER.info("Total managed routes: {} of which {} successfully started and {} re-starting", + routes.size(), + routes.stream().filter(r -> r.getStatus() == ServiceStatus.Started).count(), + routeManager.routes.size() + ); } private synchronized void stopRoutes() { @@ -542,7 +548,7 @@ public class SupervisingRouteController extends DefaultRouteController { holder.getDefinition().setAutoStartup("false"); if (contextStarted.get()) { - LOGGER.debug("Context is started: attempt to start route {}", route.getId()); + LOGGER.info("Context is already started: attempt to start route {}", route.getId()); try { SupervisingRouteController.this.doStartRoute( holder, @@ -553,7 +559,7 @@ public class SupervisingRouteController extends DefaultRouteController { throw new RuntimeCamelException(e); } } else { - LOGGER.debug("Context is not started: add route {} to stopped routes", holder.getId()); + LOGGER.info("Context is not yet started: defer route {} start", holder.getId()); } } }