You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/03/28 18:59:46 UTC

[camel] 02/03: (chores) camel-base-engine: log message cleanups

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

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

commit 7b7f3850de809ac3bb390b36f62e32c73a1ae215
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Mar 28 17:07:09 2023 +0200

    (chores) camel-base-engine: log message cleanups
---
 .../java/org/apache/camel/impl/engine/AbstractCamelContext.java  | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

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 207510cf7ef..7b34f5c8b0f 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
@@ -703,7 +703,7 @@ public abstract class AbstractCamelContext extends BaseService
             try {
                 stopServices(oldComponent);
             } catch (Exception e) {
-                LOG.warn("Error stopping component " + oldComponent + ". This exception will be ignored.", e);
+                LOG.warn("Error stopping component {}. This exception will be ignored.", oldComponent, e);
             }
             for (LifecycleStrategy strategy : lifecycleStrategies) {
                 strategy.onComponentRemove(componentName, oldComponent);
@@ -767,7 +767,7 @@ public abstract class AbstractCamelContext extends BaseService
                     try {
                         stopServices(oldEndpoint);
                     } catch (Exception e) {
-                        LOG.warn("Error stopping endpoint " + oldEndpoint + ". This exception will be ignored.", e);
+                        LOG.warn("Error stopping endpoint {}. This exception will be ignored.", oldEndpoint, e);
                     }
                     answer.add(oldEndpoint);
                     toRemove.add(entry.getKey());
@@ -2547,9 +2547,8 @@ public abstract class AbstractCamelContext extends BaseService
                 vetoed = veto;
                 return;
             } else {
-                LOG.error("Error starting CamelContext (" + camelContextExtension.getName() + ") due to exception thrown: "
-                          + e.getMessage(),
-                        e);
+                LOG.error("Error starting CamelContext ({}) due to exception thrown: {}", camelContextExtension.getName(),
+                          e.getMessage(), e);
                 throw RuntimeCamelException.wrapRuntimeException(e);
             }
         }