Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13036

Add the possibility to disable the invocation of ModelHelper.dumpModelAsXml() during testing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.23.0
    • 3.0.0.RC1, 3.0.0
    • camel-test
    • None
    • Novice

    Description

      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:

      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);
      

      In 2.X this should be optimized in RouteDefinition.java, in 3.X in RouteReifier.java.

      Possible solution: Add log.isInfoEnabled guard.

       

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            Peter Keller Peter Keller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: