You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2019/08/01 06:38:00 UTC

[jira] [Resolved] (CAMEL-13036) Add the possibility to disable the invocation of ModelHelper.dumpModelAsXml() during testing

     [ https://issues.apache.org/jira/browse/CAMEL-13036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-13036.
---------------------------------
    Resolution: Fixed

There is a setter now on AdviceWithRouteBuilder you can use, and also there is an INFO log guard

> Add the possibility to disable the invocation of ModelHelper.dumpModelAsXml() during testing
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-13036
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13036
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-test
>    Affects Versions: 2.23.0
>            Reporter: Peter Keller
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 3.0.0, 3.0.0.M5
>
>
> Add the possibility to disable the invocation of {{ModelHelper.dumpModelAsXml()}}. This is particularly disturbing for Camel contexts with a lot of route definitions as this uses a lot of processing time and the information is only used for log output.
> Actual use in 2.x in {{RouteDefinition.java}}:
> {code:java|title=RouteDefinition.java}
> String beforeAsXml = ModelHelper.dumpModelAsXml(camelContext, this);
> ...
> String afterAsXml = ModelHelper.dumpModelAsXml(camelContext, merged);
> log.info("Adviced route before/after as XML:\n{}\n{}", beforeAsXml, afterAsXml);
> {code}
> In 2.X this should be optimized in {{RouteDefinition.java}}, in 3.X in {{RouteReifier.java}}.
> Possible solution: Add {{log.isInfoEnabled{}}} guard.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)