Modified: websites/production/camel/content/tracer.html
==============================================================================
--- websites/production/camel/content/tracer.html (original)
+++ websites/production/camel/content/tracer.html Sun Aug  7 14:20:09 2016
@@ -86,97 +86,28 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Tracer-TracerInterceptor">Tracer 
Interceptor</h2>
-
-<p>Camel supports a tracer interceptor that is used for logging the route 
executions at <code>INFO</code> level.</p>
-
-<p>The Tracer is an InterceptStrategy which can be applied to a 
DefaultCamelContext or SpringCamelContext to ensure that there is a 
TracerInterceptor created for every node in the DSL.</p>
-
-<p>You can enable or disable the Tracer's logging dynamically, by calling the 
tracer's <code>setEnabled</code> method.</p>
-
-<div class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Logging dependencies</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
-<p>Checkout which <a shape="rect" 
href="camel-jar-dependencies.html">dependencies</a> are required by Camel for 
logging purpose.</p></div></div>
-
-<p>From <strong>Camel 2.12</strong> onwards you must explicit enable tracing 
on <a shape="rect" href="camelcontext.html">CamelContext</a> to use it. In XML 
DSL you do this by setting <code>&lt;camelContext trace="true" ...&gt;</code> 
and in Java you do <code>camelContext.setTracing(true)</code>.</p>
-
-<h3 id="Tracer-Options">Options</h3>
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Description 
</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
formatter </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Sets the Trace Formatter to use. Will default use 
<code>org.apache.camel.processor.interceptor.DefaultTraceFormatter</code>. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> enabled 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Flag to enable or disable this 
tracer </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
logLevel </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <cod
 e>INFO</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
The logging level to use: FATAL, ERROR, WARN, INFO, DEBUG, TRACE, OFF 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> logName 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> The log name to use. Will 
default use 
<code>org.apache.camel.processor.interceptor.TraceInterceptor</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" class="confluenceTd"><p> traceFilter </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> An exchange <a shape="rect" 
href="predicate.html">Predicate</a> to filter the tracing. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
traceInterceptors </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
false </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Flag to 
enable or 
 disable tracing of interceptors </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> traceExceptions </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> true</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Flag to enable or disable tracing of thrown exception 
during processing of the exchange </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> traceOutExchanges </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Flag to enable fine grained tracing with a callback 
for both IN (before) and OUT (after). Is disabled by default which means there 
is only one trace callback executed. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> logStackTrace </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> When tracing exception you can control whether the 
stack tra
 ce should be logged also. If <strong>not</strong> then only the exception 
class and message is logged. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> useJpa </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> To use a <code>JpaTraceEventMessage</code> from 
<strong>camel-jpa</strong> component as the <code>TraceEventMessage</code>. 
This requires that <strong>camel-jpa.jar</strong> is on the classpath. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
destinationUri </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
null </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Optional 
destination uri to route <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventExchange.html";>TraceEventExchange</a>
 containing <a shape="rect" class="external-link" href=
 
"http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventMessage.html";>TraceEventMessage</a>
 with details about the trace. Can be used for custom processing to store 
traces in database using <a shape="rect" href="jpa.html">JPA</a>. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
jpaTraceEventMessageClassName </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> null </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <strong>Camel 2.3:</strong> Fully class name for a 
custom  <code>org.apache.camel.processor.interceptor.TraceEventMessage</code> 
class which contains the traced information. For example you can use your 
custom JPA @Entity class to store traced information in a database according to 
your schema layout. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> traceHandler </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> null </p></td><td colspan="1" rowspa
 n="1" class="confluenceTd"><p> <strong>Camel 2.3:</strong> To use a custom 
<code>org.apache.camel.processor.interceptor.TraceEventHandler</code> where you 
can control what happens when a trace event occurs. </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> traceInterceptorFactory 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.3:</strong> To 
use a custom 
<code>org.apache.camel.processor.interceptor.TraceInterceptorFactory</code> 
where you can create the runtime trace instance which does the actual tracing. 
It should be a <code>Processor</code> instance. The default tracer is 
implemented in the class 
<code>org.apache.camel.processor.interceptor.TraceInterceptor</code>. 
</p></td></tr></tbody></table></div>
-</div>
-
-<h3 id="Tracer-Formatting">Formatting</h3>
-<p>The tracer formats the execution of exchanges to log lines. They are logged 
at INFO level in the log category: 
<code>org.apache.camel.processor.interceptor.TraceInterceptor</code>.<br 
clear="none">
-The tracer uses by default the 
<code>org.apache.camel.processor.interceptor.DefaultTraceFormatter</code> to 
format the log line.</p>
-
-<p><code>DefaultTraceFormatter</code> has the following options:</p>
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Description 
</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
breadCrumbLength </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
0 </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Fixed length of 
the bread crumb. 0 = no fixed length. Setting a value to e.g. 80 allows the 
tracer logs to be aligned for easier reading. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> nodeLength </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> 0 </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Fixed length of the node. 0 = no fixed length. Setting 
a value to e.g. 40 allows the tracer logs to be aligned for easier 
reading.</p></td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"><p> showBreadCrumb </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Outputs the unique unit of work for the exchange. To 
be used for correlation so you can identify the same exchange. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> showNode 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Previous and destination node, 
so you can see from -&gt; to. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> showExchangeId </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> To output the unique exchange id. Currently the 
breadcrumb is sufficient. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> showShortExchangeId </p></td><td colspan="1" 
rowspan="1" class="confluen
 ceTd"><p> false </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
To output the unique exchange id in short form, without the hostname. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
showProperties </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
false </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Output the 
exchange properties </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> showHeaders </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Output the in message headers </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> showBodyType </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> Output the in body Java type 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> showBody 
</p></td><td colspan="1" rowspan="1" c
 lass="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Output the in body </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> showOutHeaders </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Output the out (if any) message headers 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
showOutBodyType </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
false </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Output the 
out (if any) body Java type </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> showOutBody </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Output the out (if any) body </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> showExchangePattern 
</p></td><td colspan="1" rowspan="1" class
 ="confluenceTd"><p> true </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Output the exchange pattern </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> showException </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> true </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> Output the exception if the exchange has 
failed </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
showRouteId </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> true 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 
2.8:</strong> Output the id of the route </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> maxChars </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Is used to limit the number of chars logged per line. 
The default value is <code>10000</code> from <strong>Camel 2.9</strong> 
onwards. </p></td>
 </tr></tbody></table></div>
-</div>
-
-<div class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Logging stream bodies</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
-<p>Camel <a shape="rect" href="tracer.html">Tracer</a> will by default 
<strong>not</strong> log stream or files bodies <strong>from Camel 2.8 
onwards</strong>. You can force Camel to log those by setting the property on 
the <a shape="rect" href="camelcontext.html">CamelContext</a> properties</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-camelContext.getProperties().put(Exchange.LOG_DEBUG_BODY_STREAMS, true);
+<div class="wiki-content maincontent"><h2 id="Tracer-TracerInterceptor">Tracer 
Interceptor</h2><p>Camel supports a tracer interceptor that is used for logging 
the route executions at <code>INFO</code> level.</p><p>The Tracer is an 
InterceptStrategy which can be applied to a DefaultCamelContext or 
SpringCamelContext to ensure that there is a TracerInterceptor created for 
every node in the DSL.</p><p>You can enable or disable the Tracer's logging 
dynamically, by calling the tracer's <code>setEnabled</code> method.</p><div 
class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Logging dependencies</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Checkout which <a shape="rect" 
href="camel-jar-dependencies.html">dependencies</a> are required by Camel for 
logging purpose.</p></div></div><p>From <strong>Camel 2.12</strong> onwards you 
must explicit enable 
 tracing on <a shape="rect" href="camelcontext.html">CamelContext</a> to use 
it. In XML DSL you do this by setting <code>&lt;camelContext trace="true" 
...&gt;</code> and in Java you do 
<code>camelContext.setTracing(true)</code>.</p><h3 
id="Tracer-Options">Options</h3><div class="confluenceTableSmall"><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>formatter</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Sets the Trace Formatter to use. Will default use 
<code>org.apache.camel.processor.interceptor.DefaultTraceFormatter</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" class="confluenceTd"><p>enabled</p></td><td colspan="1"
  rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Flag to enable or disable this 
tracer</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>logLevel</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>INFO</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The logging level to use: FATAL, ERROR, WARN, INFO, 
DEBUG, TRACE, OFF</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>logName</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The log name to use. Will default use 
<code>org.apache.camel.processor.interceptor.TraceInterceptor</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" class="confluenceTd"><p>traceFilter</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>An exchange <a shape="rect" 
href="predicate.html">Pre
 dicate</a> to filter the tracing.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>traceInterceptors</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Flag to enable or disable tracing of 
interceptors</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>traceExceptions</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Flag to enable or disable tracing of thrown exception 
during processing of the exchange</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>traceOutExchanges</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Flag to enable fine grained tracing with a callback for 
both IN (before) and OUT (after). Is disabled by default which means there is 
only one trace callback executed.</p></td></tr><tr><td 
 colspan="1" rowspan="1" class="confluenceTd"><p>logStackTrace</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>When tracing exception you can control 
whether the stack trace should be logged also. If <strong>not</strong> then 
only the exception class and message is logged.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>useJpa</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>To use a <code>JpaTraceEventMessage</code> from 
<strong>camel-jpa</strong> component as the <code>TraceEventMessage</code>. 
This requires that <strong>camel-jpa.jar</strong> is on the 
classpath.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>destinationUri</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Optional destination uri to route <a sha
 pe="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventExchange.html";>TraceEventExchange</a>
 containing <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventMessage.html";>TraceEventMessage</a>
 with details about the trace. Can be used for custom processing to store 
traces in database using <a shape="rect" 
href="jpa.html">JPA</a>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>jpaTraceEventMessageClassName</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.3:</strong> Fully class name for a 
custom <code>org.apache.camel.processor.interceptor.TraceEventMessage</code> 
class which contains the traced information. For example you can use your 
custom JPA @Entity class to store traced information 
 in a database according to your schema layout.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>traceHandler</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> To use a custom 
<code>org.apache.camel.processor.interceptor.TraceEventHandler</code> where you 
can control what happens when a trace event occurs.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p>traceInterceptorFactory</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.3:</strong> To use a custom 
<code>org.apache.camel.processor.interceptor.TraceInterceptorFactory</code> 
where you can create the runtime trace instance which does the actual tracing. 
It should be a <code>Processor</code> instance. The default tracer is 
implemented in the class <code>org.apache.camel.processor.interceptor.TraceInter
 ceptor</code>.</p></td></tr></tbody></table></div></div><h3 
id="Tracer-Formatting">Formatting</h3><p>The tracer formats the execution of 
exchanges to log lines. They are logged at INFO level in the log category: 
<code>org.apache.camel.processor.interceptor.TraceInterceptor</code>.<br 
clear="none"> The tracer uses by default the 
<code>org.apache.camel.processor.interceptor.DefaultTraceFormatter</code> to 
format the log line.</p><p><code>DefaultTraceFormatter</code> has the following 
options:</p><div class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>breadCrumbLength</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>0</p></td><td colspan="1" rowspan="1" 
class="confluen
 ceTd"><p>Fixed length of the bread crumb. 0 = no fixed length. Setting a value 
to e.g. 80 allows the tracer logs to be aligned for easier 
reading.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>nodeLength</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>0</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Fixed length of the node. 0 = no fixed length. Setting 
a value to e.g. 40 allows the tracer logs to be aligned for easier 
reading.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showBreadCrumb</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Outputs the unique unit of work for the exchange. To be 
used for correlation so you can identify the same 
exchange.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showNode</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" class="conflu
 enceTd"><p>Previous and destination node, so you can see from -&gt; 
to.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showExchangeId</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>To output the unique exchange id. Currently the 
breadcrumb is sufficient.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showShortExchangeId</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>To output the unique exchange id in short form, without 
the hostname.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showProperties</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Output the exchange properties</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>showHeaders</p></td><td 
colspan="1" rowspan="1
 " class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Output the in message headers</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>showBodyType</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Output the in body Java 
type</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showBody</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Output the in body</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>showOutHeaders</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Output the out (if any) message 
headers</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showOutBodyType</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>false</p></td><td colsp
 an="1" rowspan="1" class="confluenceTd"><p>Output the out (if any) body Java 
type</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showOutBody</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Output the out (if any) body</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>showExchangePattern</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Output the exchange 
pattern</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showException</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Output the exception if the exchange has 
failed</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>showRouteId</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1"
  class="confluenceTd"><p><strong>Camel 2.8:</strong> Output the id of the 
route</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>maxChars</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Is used to limit the number of chars logged per line. 
The default value is <code>10000</code> from <strong>Camel 2.9</strong> 
onwards.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd">multiline</td><td colspan="1" rowspan="1" 
class="confluenceTd">false</td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.18:</strong> If true, each piece of 
information is logged on a new line.</td></tr></tbody></table></div></div><div 
class="confluence-information-macro confluence-information-macro-tip"><p 
class="title">Logging stream bodies</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"
 ><p>Camel <a shape="rect" href="tracer.html">Tracer</a> will by default 
 ><strong>not</strong> log stream or files bodies <strong>from Camel 2.8 
 >onwards</strong>. You can force Camel to log those by setting the property on 
 >the <a shape="rect" href="camelcontext.html">CamelContext</a> 
 >properties</p><div class="code panel pdl" style="border-width: 1px;"><div 
 >class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[camelContext.getProperties().put(Exchange.LOG_DEBUG_BODY_STREAMS,
 true);
 ]]></script>
-</div></div></div></div>
-
-
-<p>Example:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-ID-claus-acer/4412-1222625653890/2-0 -&gt; to(mock:a)                , 
Pattern:InOnly , Headers:{to=James} , BodyType:String , Body:Hello London
+</div></div></div></div><p>Example:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[ID-claus-acer/4412-1222625653890/2-0 -&gt; 
to(mock:a)                , Pattern:InOnly , Headers:{to=James} , 
BodyType:String , Body:Hello London
 ]]></script>
-</div></div>
-
-<p><code>ID-claus-acer/3690-1214458315718/2-0</code> is the breadcrumb with 
the unique correlation id.<br clear="none">
-<code>node3</code> is the id of the node in the route path. Is always 
shown.<br clear="none">
-<code>To[mock:a]</code> is the destination node.<br clear="none">
-<code>InOnly</code> is the exchange pattern. Is always shown.<br clear="none">
-Then the rest is properties, headers and the body.</p>
-
-<h4 id="Tracer-Showingfromandto">Showing from and to</h4>
-<p>The trace log will output both the from and to so you can see where the 
Exchange came from, such as:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-&gt;&gt;&gt; direct:start --&gt; process(MyProcessor)
+</div></div><p><code>ID-claus-acer/3690-1214458315718/2-0</code> is the 
breadcrumb with the unique correlation id.<br clear="none"> <code>node3</code> 
is the id of the node in the route path. Is always shown.<br clear="none"> 
<code>To[mock:a]</code> is the destination node.<br clear="none"> 
<code>InOnly</code> is the exchange pattern. Is always shown.<br clear="none"> 
Then the rest is properties, headers and the body.</p><h4 
id="Tracer-Showingfromandto">Showing from and to</h4><p>The trace log will 
output both the from and to so you can see where the Exchange came from, such 
as:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&gt;&gt;&gt; direct:start --&gt; 
process(MyProcessor)
 &gt;&gt;&gt; process(MyProcessor) --&gt; to(mock:a)
 &gt;&gt;&gt; to(mock:a) --&gt; to(mock:b)
 ]]></script>
-</div></div>
-
-<h3 id="Tracer-Enabling">Enabling</h3>
-
-<p>To enable tracer from the main run</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-java org.apache.camel.spring.Main -t
+</div></div><h3 id="Tracer-Enabling">Enabling</h3><p>To enable tracer from the 
main run</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[java org.apache.camel.spring.Main -t
 ]]></script>
-</div></div>
-<p>or </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-java org.apache.camel.spring.Main -trace
+</div></div><p>or</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[java org.apache.camel.spring.Main -trace
 ]]></script>
-</div></div>
-
-<p>and the tracer will be active.</p>
-
-<h3 id="Tracer-EnablingfromJavaDSL">Enabling from Java DSL</h3>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-context.setTracing(true);
+</div></div><p>and the tracer will be active.</p><h3 
id="Tracer-EnablingfromJavaDSL">Enabling from Java DSL</h3><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[context.setTracing(true);
 ]]></script>
-</div></div>
-
-<p>You can configure tracing at a higher granularity as you can configure it 
on camel context and then override and set it per route as well. For instance 
you could just enable tracer for one particular route.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-INFO  TraceInterceptor     - ID-davsclaus-local-54403-1246038742624-0-0 
&gt;&gt;&gt; from(direct:start) --&gt; MyProcessor     , Pattern:InOnly, 
Headers:{to=James}, BodyType:String, Body:Hello London
+</div></div><p>You can configure tracing at a higher granularity as you can 
configure it on camel context and then override and set it per route as well. 
For instance you could just enable tracer for one particular route.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[INFO  TraceInterceptor     - 
ID-davsclaus-local-54403-1246038742624-0-0 &gt;&gt;&gt; from(direct:start) 
--&gt; MyProcessor     , Pattern:InOnly, Headers:{to=James}, BodyType:String, 
Body:Hello London
 INFO  TraceInterceptor     - ID-davsclaus-local-54403-1246038742624-0-0 
&gt;&gt;&gt; MyProcessor --&gt; mock:a                 , Pattern:InOnly, 
Headers:{to=James}, BodyType:String, Body:Hello London
 INFO  TraceInterceptor     - ID-davsclaus-local-54403-1246038742624-0-0 
&gt;&gt;&gt; mock:a --&gt; mock:b                      , Pattern:InOnly, 
Headers:{to=James}, BodyType:String, Body:Hello London
 ...
@@ -184,13 +115,8 @@ INFO  TraceInterceptor     - ID-davsclau
 INFO  TraceInterceptor     - ID-davsclaus-local-54403-1246038742624-0-1 
&gt;&gt;&gt; MyProcessor --&gt; mock:a                 , Pattern:InOnly, 
Headers:{from=Claus}, BodyType:String, Body:This is Copenhagen calling
 INFO  TraceInterceptor     - ID-davsclaus-local-54403-1246038742624-0-1 
&gt;&gt;&gt; mock:a --&gt; mock:b                      , Pattern:InOnly, 
Headers:{from=Claus}, BodyType:String, Body:This is Copenhagen calling
 ]]></script>
-</div></div>
-
-<h3 id="Tracer-ConfiguringfromJavaDSL">Configuring from Java DSL</h3>
-<p>The tracer options can be configured from the Java DSL like this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-    public void configure() throws Exception {
+</div></div><h3 id="Tracer-ConfiguringfromJavaDSL">Configuring from Java 
DSL</h3><p>The tracer options can be configured from the Java DSL like 
this:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[    public void configure() throws Exception {
         // add tracer as an interceptor so it will log the exchange executions 
at runtime
         // this can aid us to understand/see how the exchanges is routed etc.
         Tracer tracer = new Tracer();
@@ -199,40 +125,19 @@ INFO  TraceInterceptor     - ID-davsclau
         ...
         getContext().addInterceptStrategy(tracer);
 ]]></script>
-</div></div>
-
-<h4 id="Tracer-Usingpredicatestofilterexchanges">Using predicates to filter 
exchanges</h4>
-<p>In the code below we want the tracer only to trace if the body contains the 
text <code>London</code>. As this is just an example can of course set any <a 
shape="rect" href="predicate.html">Predicate</a> that matches your criteria:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-    Tracer tracer = new Tracer();
+</div></div><h4 id="Tracer-Usingpredicatestofilterexchanges">Using predicates 
to filter exchanges</h4><p>In the code below we want the tracer only to trace 
if the body contains the text <code>London</code>. As this is just an example 
can of course set any <a shape="rect" href="predicate.html">Predicate</a> that 
matches your criteria:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[    Tracer tracer = new Tracer();
     // set the level to FATAL so we can easily spot it
     tracer.setLogLevel(LoggingLevel.FATAL);
     // and only trace if the body contains London as text
     tracer.setTraceFilter(body().contains(constant(&quot;London&quot;)));
 ]]></script>
-</div></div>
-
-<h3 id="Tracer-EnablingfromSpringXML">Enabling from Spring XML</h3>
-
-<p>There is now a <strong>trace</strong> attribute you can specify on the 
*&lt;camelContext/&gt; for example</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-  &lt;camelContext trace=&quot;true&quot; 
xmlns=&quot;http://activemq.apache.org/camel/schema/spring&quot;&gt;
+</div></div><h3 id="Tracer-EnablingfromSpringXML">Enabling from Spring 
XML</h3><p>There is now a <strong>trace</strong> attribute you can specify on 
the *&lt;camelContext/&gt; for example</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;camelContext trace=&quot;true&quot; 
xmlns=&quot;http://activemq.apache.org/camel/schema/spring&quot;&gt;
     ...
   &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<p>You can see this in action with the <a shape="rect" class="external-link" 
href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceTest.java";>SpringTraceTest</a>
 and its <a shape="rect" class="external-link" 
href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTraceTest-context.xml";>spring.xml
 file</a></p>
-
-<p>Another option is to just include a spring XML which defines the Tracer 
bean such as the <a shape="rect" class="external-link" 
href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/main/resources/META-INF/services/org/apache/camel/spring/trace.xml";>one
 that is automatically included if you run the Main with -t above</a>.</p>
-
-<h3 id="Tracer-ConfigurationfromSpring">Configuration from Spring</h3>
-<p>You can configure the tracer as a Spring bean. Just add a bean with the 
bean class <code>org.apache.camel.processor.interceptor.Tracer</code> and Camel 
will use it as the Tracer.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>You can see this in action with the <a shape="rect" 
class="external-link" 
href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceTest.java";>SpringTraceTest</a>
 and its <a shape="rect" class="external-link" 
href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringTraceTest-context.xml";>spring.xml
 file</a></p><p>Another option is to just include a spring XML which defines 
the Tracer bean such as the <a shape="rect" class="external-link" 
href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/main/resources/META-INF/services/org/apache/camel/spring/trace.xml";>one
 that is automatically included if you run the Main with -t above</a>.</p><h3 
id="Tracer-ConfigurationfromSpring">Configuration from Spring</h3><p>You can 
configure the tracer as a Spring bean. Just add a bean with the bean class 
<code>org.
 apache.camel.processor.interceptor.Tracer</code> and Camel will use it as the 
Tracer.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;!-- we can configure the tracer by defining the tracer bean and set the 
properties as we like --&gt;
 &lt;!-- the id name can be anything its the class that must be 
org.apache.camel.processor.interceptor.Tracer --&gt;
@@ -250,11 +155,7 @@ INFO  TraceInterceptor     - ID-davsclau
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<p>You can configure the formatting of tracer as a Spring bean. Just add a 
bean with the id <strong>traceFormatter</strong> and Camel will lookup this id 
and use the formatter, as the example below illustrates:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div>You can configure the formatting of tracer as a Spring bean. Just 
add a bean with the id <strong>traceFormatter</strong> and Camel will lookup 
this id and use the formatter, as the example below illustrates:<div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;bean id=&quot;traceFormatter&quot; 
class=&quot;org.apache.camel.processor.interceptor.DefaultTraceFormatter&quot;&gt;
     &lt;property name=&quot;showBody&quot; value=&quot;true&quot;/&gt;
@@ -270,13 +171,7 @@ INFO  TraceInterceptor     - ID-davsclau
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<h3 id="Tracer-Enabletracingofoutmessages">Enable tracing of out messages</h3>
-
-<p>You can trace messages coming out of processing steps. To enable this, 
configure the tracer as follows</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 1px;"><b>Java DSL</b></div><div 
class="codeContent panelContent pdl">
+</div></div><h3 id="Tracer-Enabletracingofoutmessages">Enable tracing of out 
messages</h3><p>You can trace messages coming out of processing steps. To 
enable this, configure the tracer as follows</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>Java DSL</b></div><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 Tracer tracer = new Tracer();
 tracer.setTraceOutExchanges(true);
@@ -292,9 +187,7 @@ tracer.setFormatter(formatter);
 
 getContext().addInterceptStrategy(tracer);
 ]]></script>
-</div></div>
-<p>or</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 1px;"><b>Spring DSL</b></div><div 
class="codeContent panelContent pdl">
+</div></div>or<div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Spring 
DSL</b></div><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;bean id=&quot;camelTracer&quot; 
class=&quot;org.apache.camel.processor.interceptor.Tracer&quot;&gt;
   &lt;property name=&quot;traceOutExchanges&quot; value=&quot;true&quot; /&gt;
@@ -305,22 +198,11 @@ getContext().addInterceptStrategy(tracer
   &lt;property name=&quot;showOutBodyType&quot; value=&quot;true&quot; /&gt;
 &lt;/bean&gt;
 ]]></script>
-</div></div>
-
-<p>Running with these options, you'll get output similar to:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-INFO  TraceInterceptor - ID-mojo/59899-1225474989226/2-0 -&gt; transform(body) 
, Pattern:InOnly , Headers:{to=James} , BodyType:String , Body:Hello London
+</div></div>Running with these options, you'll get output similar to:<div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[INFO  TraceInterceptor - 
ID-mojo/59899-1225474989226/2-0 -&gt; transform(body) , Pattern:InOnly , 
Headers:{to=James} , BodyType:String , Body:Hello London
 INFO  TraceInterceptor - transform(body) -&gt; ID-mojo/59899-1225474989226/2-0 
, Pattern:InOnly , Headers:{to=James} , BodyType:String , Body:Hello London , 
OutBodyType:String , OutBody:Hello London
 ]]></script>
-</div></div>
-
-<h3 id="Tracer-UsingCustomFormatter">Using Custom Formatter</h3>
-
-<p>You can now implement your own 
<code>org.apache.camel.processor.interceptor.TraceFormatter</code> to be used 
for logging trace messages to the log. </p>
-
-<p>The sample below shows how to configure a Tracer from Java DSL using custom 
formatter:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h3 id="Tracer-UsingCustomFormatter">Using Custom 
Formatter</h3><p>You can now implement your own 
<code>org.apache.camel.processor.interceptor.TraceFormatter</code> to be used 
for logging trace messages to the log.</p><p>The sample below shows how to 
configure a Tracer from Java DSL using custom formatter:</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 // we create a tracer where we want to use our own formatter instead of the 
default one
 Tracer tracer = new Tracer();
@@ -332,10 +214,7 @@ tracer.setFormatter(formatter);
 // and we must remeber to add the tracer to Camel
 getContext().addInterceptStrategy(tracer);
 ]]></script>
-</div></div>
-
-<p>And here we have our custom logger that implements the 
<code>TraceFormatter</code> interface where we can construct the log message 
how we like:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div>And here we have our custom logger that implements the 
<code>TraceFormatter</code> interface where we can construct the log message 
how we like:<div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 // here we have out own formatter where we can create the output we want for 
trace logs
 // as this is a test we just create a simple string with * around the body
@@ -346,23 +225,7 @@ class MyTraceFormatter implements TraceF
     }
 }
 ]]></script>
-</div></div>
-
-<h3 id="Tracer-UsingDestinationforcustomprocessingandrouting">Using 
Destination for custom processing and routing</h3>
-
-<p>Tracer supports custom processing of trace events. This can be used to 
route a trace event to a <a shape="rect" href="jpa.html">JPA</a> endpoint for 
persistence in a database.</p>
-
-<p>This works by Camel creates a new <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventMessage.html";>TraceEventMessage</a>
 containing:</p>
-<ul class="alternate"><li>snapshot of the original traced Exchange as a 
immutable <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventMessage.html";>TraceEventMessage</a>
 containing String values of the fields, when the interception occurred. This 
ensures the fields contains the exact data at the given time of 
interception.</li><li>the original Exchange can in some implementations be 
accessed using <code>getTracedExchange()</code> (though with JPA based tracer 
you cannot get the original Exchange).</li></ul>
-
-
-<div class="confluence-information-macro 
confluence-information-macro-warning"><span class="aui-icon aui-icon-small 
aui-iconfont-error confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body">
-<p>Beware to access the original Exchange to avoid causing any side effects or 
alter its state. Prefer to access the information from <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventMessage.html";>TraceEventMessage</a></p></div></div>
-
-<p>Camel routes the TraceEventMessage synchronously from the point of 
interception. When its completed Camel will continue routing the original 
Exchange.</p>
-
-<p>The sample below demonstrates this feature, where we route traced Exchanges 
to the <code>direct:traced</code> route:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h3 
id="Tracer-UsingDestinationforcustomprocessingandrouting">Using Destination for 
custom processing and routing</h3><p>Tracer supports custom processing of trace 
events. This can be used to route a trace event to a <a shape="rect" 
href="jpa.html">JPA</a> endpoint for persistence in a database.</p><p>This 
works by Camel creates a new <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventMessage.html";>TraceEventMessage</a>
 containing:</p><ul class="alternate"><li>snapshot of the original traced 
Exchange as a immutable <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventMessage.html";>TraceEventMessage</a>
 containing String values of the fields, when the interception occurred. This 
ensures the fields contains the exact data at the given time of 
interception.</li><li>the original Exc
 hange can in some implementations be accessed using 
<code>getTracedExchange()</code> (though with JPA based tracer you cannot get 
the original Exchange).</li></ul><div class="confluence-information-macro 
confluence-information-macro-warning"><span class="aui-icon aui-icon-small 
aui-iconfont-error confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Beware to access the original 
Exchange to avoid causing any side effects or alter its state. Prefer to access 
the information from <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/interceptor/TraceEventMessage.html";>TraceEventMessage</a></p></div></div><p>Camel
 routes the TraceEventMessage synchronously from the point of interception. 
When its completed Camel will continue routing the original Exchange.</p><p>The 
sample below demonstrates this feature, where we route traced Exchanges to the 
<code>direct:traced</code> route
 :</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 // we create a tracer where we want to send TraveEvents to an endpoint
 // &quot;direct:traced&quot; where we can do some custom processing such as 
storing
@@ -375,17 +238,10 @@ tracer.setLogLevel(LoggingLevel.OFF);
 // and we must remember to add the tracer to Camel
 getContext().addInterceptStrategy(tracer);
 ]]></script>
-</div></div>
-
-<p>Then we can configure a route for the traced messages:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-   from(&quot;direct:traced&quot;).process(new 
MyTraceMessageProcessor()).to(&quot;file://myapp/logs/trace);
+</div></div>Then we can configure a route for the traced messages:<div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[   
from(&quot;direct:traced&quot;).process(new 
MyTraceMessageProcessor()).to(&quot;file://myapp/logs/trace);
 ]]></script>
-</div></div>
-
-<p>And our processor where we can process the TraceEventMessage. Here we want 
to create a CSV format of the trace event to be stored as a file. We do this by 
constructing the CSV String and the replace the IN body with our String instead 
of the <code>TraceEventMessage</code>.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>And our processor where we can process the TraceEventMessage. 
Here we want to create a CSV format of the trace event to be stored as a file. 
We do this by constructing the CSV String and the replace the IN body with our 
String instead of the <code>TraceEventMessage</code>.</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 class MyTraceMessageProcessor implements Processor {
 
@@ -401,19 +257,7 @@ class MyTraceMessageProcessor implements
     }
 }
 ]]></script>
-</div></div>
-
-<h3 id="Tracer-Usingasdatastorefortracemessages">Using <a shape="rect" 
href="jpa.html">JPA</a> as datastore for trace messages</h3>
-
-<p>See <a shape="rect" href="tracer-example.html">Tracer Example</a> for 
complete documentation and how to use this feature.</p>
-
-<h3 id="Tracer-Tracedroutepathduringruntime">Traced route path during 
runtime</h3>
-
-<p><a shape="rect" href="tracer.html">Tracer</a> also traces the actual route 
path taken during runtime. Camel will store the route path taken on the 
UnitOfWork when <a shape="rect" href="tracer.html">Tracer</a> is enabled. </p>
-
-<p>The example below demonstrates how we can use that for error handling where 
we can determine at which node in the route graph the error triggered.<br 
clear="none">
-First we define our route:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h3 id="Tracer-Usingasdatastorefortracemessages">Using <a 
shape="rect" href="jpa.html">JPA</a> as datastore for trace messages</h3><p>See 
<a shape="rect" href="tracer-example.html">Tracer Example</a> for complete 
documentation and how to use this feature.</p><h3 
id="Tracer-Tracedroutepathduringruntime">Traced route path during 
runtime</h3><p><a shape="rect" href="tracer.html">Tracer</a> also traces the 
actual route path taken during runtime. Camel will store the route path taken 
on the UnitOfWork when <a shape="rect" href="tracer.html">Tracer</a> is 
enabled.</p><p>The example below demonstrates how we can use that for error 
handling where we can determine at which node in the route graph the error 
triggered.<br clear="none"> First we define our route:</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 protected RouteBuilder createRouteBuilder() throws Exception {
     return new RouteBuilder() {
@@ -434,10 +278,7 @@ protected RouteBuilder createRouteBuilde
     };
 }
 ]]></script>
-</div></div>
-
-<p>And then our custom error processor where we can handle the exception and 
figure out at which node the exception occurred.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div>And then our custom error processor where we can handle the 
exception and figure out at which node the exception occurred.<div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 private static class MyErrorProcessor implements Processor {
     public void process(Exchange exchange) throws Exception {
@@ -464,10 +305,7 @@ private static class MyErrorProcessor im
     }
 }
 ]]></script>
-</div></div>
-
-<h3 id="Tracer-SeeAlso">See Also</h3>
-<ul class="alternate"><li><a shape="rect" href="tracer-example.html">Tracer 
Example</a></li><li><a shape="rect" 
href="debugger.html">Debugger</a></li><li><a shape="rect" 
href="delay-interceptor.html">Delay Interceptor</a></li><li><a shape="rect" 
href="log.html">Log</a></li></ul></div>
+</div></div><h3 id="Tracer-SeeAlso">See Also</h3><ul class="alternate"><li><a 
shape="rect" href="tracer-example.html">Tracer Example</a></li><li><a 
shape="rect" href="debugger.html">Debugger</a></li><li><a shape="rect" 
href="delay-interceptor.html">Delay Interceptor</a></li><li><a shape="rect" 
href="log.html">Log</a></li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">


Reply via email to