camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [camel] branch master updated: CAMEL-12314: Dump routes as xml before/after when using advice with.
Date Sat, 03 Mar 2018 14:08:39 GMT
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


The following commit(s) were added to refs/heads/master by this push:
     new 7787e93  CAMEL-12314: Dump routes as xml before/after when using advice with.
7787e93 is described below

commit 7787e93f17a26a2b9d75dc555f894623edba7137
Author: Claus Ibsen <claus.ibsen@gmail.com>
AuthorDate: Sat Mar 3 14:56:11 2018 +0100

    CAMEL-12314: Dump routes as xml before/after when using advice with.
---
 camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java b/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
index a384934..ddb3fb9 100644
--- a/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
@@ -278,6 +278,8 @@ public class RouteDefinition extends ProcessorDefinition<RouteDefinition>
{
             throw new IllegalArgumentException("You can not advice with error handlers. Remove
the error handlers from the route builder.");
         }
 
+        String beforeAsXml = ModelHelper.dumpModelAsXml(camelContext, this);
+
         // stop and remove this existing route
         camelContext.removeRouteDefinition(this);
 
@@ -298,6 +300,9 @@ public class RouteDefinition extends ProcessorDefinition<RouteDefinition>
{
         // log the merged route at info level to make it easier to end users to spot any
mistakes they may have made
         log.info("AdviceWith route after: {}", merged);
 
+        String afterAsXml = ModelHelper.dumpModelAsXml(camelContext, merged);
+        log.info("Adviced route before/after as XML:\n{}\n{}", beforeAsXml, afterAsXml);
+
         // If the camel context is started then we start the route
         if (camelContext instanceof StatefulService) {
             StatefulService service = (StatefulService) camelContext;

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

Mime
View raw message