Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Camel provides many ways to log processing a message. Here is just some examples:

  • You can use the Log component which logs the Message content.
  • You can use the Tracer which trace logs message flow.
  • You can also use a Processor or Bean and log from Java code.
  • You can use the log DSL.

Using log DSL

And in Camel 2.2 you can use the log DSL which allows you to use Simple language to construct a dynamic message which gets logged.
For example you can do

...

Code Block
xml
xml
        <route id="baz">
            <from uri="direct:baz"/>
            <log message="Me Got ${body}" loggingLevel="FATAL" logName="com.mycompany.MyCoolRoute" marker="myMarker"/>
            <to uri="mock:baz"/>
        </route>
Include Page
CAMEL:Using This PatternCAMEL:
Using This Pattern