Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
2008-06-26 07:31:55,828 [main           ] INFO  TraceInterceptor               - ID-claus-acer/3690-1214458315718/2-0 -> node5 Interceptor[Delegate(Pipeline[DeadLetterChannel[Delegate(TraceInterceptor[Processor[MyProcessor]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]], DeadLetterChannel[Delegate(TraceInterceptor[To[mock:a]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]], DeadLetterChannel[Delegate(TraceInterceptor[To[mock:b]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]]])] InOnly Properties:{} Headers:{to=James} Body:Hello London
2008-06-26 07:31:55,843 [main           ] INFO  TraceInterceptor               - ID-claus-acer/3690-1214458315718/2-0 -> node2 Processor[MyProcessor] InOnly Properties:{CamelCauseException=null} Headers:{to=James} Body:Hello London
2008-06-26 07:31:55,843 [main           ] INFO  TraceInterceptor               - ID-claus-acer/3690-1214458315718/2-0 -> node3 To[mock:a] InOnly Properties:{CamelCauseException=null} Headers:{to=James} Body:Hello London
2008-06-26 07:31:55,843 [main           ] INFO  TraceInterceptor               - ID-claus-acer/3690-1214458315718/2-0 -> node4 To[mock:b] InOnly Properties:{CamelCauseException=null} Headers:{to=James} Body:Hello London
2008-06-26 07:31:55,859 [main           ] INFO  TraceInterceptor               - ID-claus-acer/3690-1214458315718/2-1 -> node5 Interceptor[Delegate(Pipeline[DeadLetterChannel[Delegate(TraceInterceptor[Processor[MyProcessor]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]], DeadLetterChannel[Delegate(TraceInterceptor[To[mock:a]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]], DeadLetterChannel[Delegate(TraceInterceptor[To[mock:b]]), RecipientList[log:org.apache.camel.DeadLetterChannel?level=error], RedeliveryPolicy[maximumRedeliveries=6]]])] InOnly Properties:{} Headers:{from=Claus} Body:This is Copenhagen calling
2008-06-26 07:31:55,859 [main           ] INFO  TraceInterceptor               - ID-claus-acer/3690-1214458315718/2-1 -> node2 Processor[MyProcessor] InOnly Properties:{CamelCauseException=null} Headers:{from=Claus} Body:This is Copenhagen calling
2008-06-26 07:31:55,875 [main           ] INFO  TraceInterceptor               - ID-claus-acer/3690-1214458315718/2-1 -> node3 To[mock:a] InOnly Properties:{CamelCauseException=null} Headers:{from=Claus} Body:This is Copenhagen calling
2008-06-26 07:31:55,875 [main           ] INFO  TraceInterceptor               - ID-claus-acer/3690-1214458315718/2-1 -> node4 To[mock:b] InOnly Properties:{CamelCauseException=null} Headers:{from=Claus} Body:This is Copenhagen calling

Enabling from Spring XML

There is now a trace attribute you can specify on the *<camelContext/> for example

Code Block

  <camelContext trace="true" xmlns="http://activemq.apache.org/camel/schema/spring">
    ...
  </camelContext>

You can see this in action with the SpringTraceTest and its spring.xml file

Another option is to just include a spring XML which defines the Tracer bean such as the one that is automatically included if you run the Main with -t above.TODO: Spring XML

See Also

See Debugger