camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r856233 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache log.html
Date Thu, 28 Mar 2013 01:27:43 GMT
Author: buildbot
Date: Thu Mar 28 01:27:42 2013
New Revision: 856233

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/log.html

Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Thu Mar 28 01:27:42 2013
@@ -10397,13 +10397,57 @@ to(<span class="code-quote">"log:com.myc
 </pre>
 </div></div>
 
+<h3><a shape="rect" name="BookComponentAppendix-Fullcustomizationoftheloggingoutput"></a>Full
customization of the logging output</h3>
+
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>With the options outlined in the <a shape="rect" href="#BookComponentAppendix-Formatting">Formatting</a>
section, you can control much of the output of the logger. However, log lines will always
follow this structure:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+Exchange[Id:ID-machine-local-50656-1234567901234-1-2, ExchangePattern:InOut, 
+Properties:{CamelToEndpoint=log:<span class="code-comment">//org.apache.camel.component.log.TEST?showAll=<span
class="code-keyword">true</span>, 
+</span>CamelCreatedTimestamp=Thu Mar 28 00:00:00 WET 2013}, 
+Headers:{breadcrumbId=ID-machine-local-50656-1234567901234-1-1}, BodyType:<span class="code-object">String</span>,
Body:Hello World, Out: <span class="code-keyword">null</span>]
+</pre>
+</div></div>
+
+<p>This format is unsuitable in some cases, perhaps because you need to...</p>
+
+<ul><li>... filter the headers and properties that are printed, to strike a balance
between insight and verbosity.</li><li>... adjust the log message to whatever
you deem most readable.</li><li>... tailor log messages for digestion by log mining
systems, e.g. Splunk.</li><li>... print specific body types differently.</li><li>...
etc.</li></ul>
+
+
+<p>Whenever you require absolute customization, you can create a class that implements
the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/ExchangeFormatter.html"><tt>ExchangeFormatter</tt></a>
interface. Within the <tt>format(Exchange)</tt> method you have access to the
full Exchange, so you can select and extract the precise information you need, format it in
a custom manner and return it. The return value will become the final log message.</p>
+
+<p>You can have the Log component pick up your custom <tt>ExchangeFormatter</tt>
in either of two ways:</p>
+
+<p><b>Explicitly instantiating the LogComponent in your Registry:</b></p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean name=<span class="code-quote">"log"</span> class=<span class="code-quote">"org.apache.camel.component.log.LogComponent"</span>&gt;
+   &lt;property name=<span class="code-quote">"exchangeFormatter"</span>
ref=<span class="code-quote">"myCustomFormatter"</span> /&gt;
+&lt;/bean&gt;
+</pre>
+</div></div>
+
+<p><b>Convention over configuration:</b></p>
+
+<p>Simply by registering a bean with the name <tt>logFormatter</tt>; the
Log Component is intelligent enough to pick it up automatically.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean name=<span class="code-quote">"logFormatter"</span> class=<span
class="code-quote">"com.xyz.MyCustomExchangeFormatter"</span> /&gt;
+</pre>
+</div></div>
+
+<p>NOTE: the <tt>ExchangeFormatter</tt> gets applied to <b>all Log
endpoints within that Camel Context</b>. If you need different ExchangeFormatters for
different endpoints, just instantiate the LogComponent as many times as needed, and use the
relevant bean name as the endpoint prefix.</p>
 
 <h3><a shape="rect" name="BookComponentAppendix-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring
Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a
shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a
shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
 
 <ul><li><a shape="rect" href="tracer.html" title="Tracer">Tracer</a></li><li><a
shape="rect" href="how-do-i-use-log4j.html" title="How do I use log4j">How do I use log4j</a></li><li><a
shape="rect" href="how-do-i-use-java-14-logging.html" title="How do I use Java 1.4 logging">How
do I use Java 1.4 logging</a></li><li><a shape="rect" href="logeip.html"
title="LogEIP">LogEIP</a> for using <tt>log</tt> directly in the DSL
for human logs.</li></ul>
 
-
 <h2><a shape="rect" name="BookComponentAppendix-Lucene%28IndexerandSearch%29Component"></a>Lucene
(Indexer and Search) Component</h2>
 
 <p><b>Available as of Camel 2.2</b></p>

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Thu Mar 28 01:27:42 2013
@@ -31255,13 +31255,57 @@ to(<span class="code-quote">"log:com.myc
 </pre>
 </div></div>
 
+<h3><a shape="rect" name="BookInOnePage-Fullcustomizationoftheloggingoutput"></a>Full
customization of the logging output</h3>
+
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>With the options outlined in the <a shape="rect" href="#BookInOnePage-Formatting">Formatting</a>
section, you can control much of the output of the logger. However, log lines will always
follow this structure:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+Exchange[Id:ID-machine-local-50656-1234567901234-1-2, ExchangePattern:InOut, 
+Properties:{CamelToEndpoint=log:<span class="code-comment">//org.apache.camel.component.log.TEST?showAll=<span
class="code-keyword">true</span>, 
+</span>CamelCreatedTimestamp=Thu Mar 28 00:00:00 WET 2013}, 
+Headers:{breadcrumbId=ID-machine-local-50656-1234567901234-1-1}, BodyType:<span class="code-object">String</span>,
Body:Hello World, Out: <span class="code-keyword">null</span>]
+</pre>
+</div></div>
+
+<p>This format is unsuitable in some cases, perhaps because you need to...</p>
+
+<ul><li>... filter the headers and properties that are printed, to strike a balance
between insight and verbosity.</li><li>... adjust the log message to whatever
you deem most readable.</li><li>... tailor log messages for digestion by log mining
systems, e.g. Splunk.</li><li>... print specific body types differently.</li><li>...
etc.</li></ul>
+
+
+<p>Whenever you require absolute customization, you can create a class that implements
the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/ExchangeFormatter.html"><tt>ExchangeFormatter</tt></a>
interface. Within the <tt>format(Exchange)</tt> method you have access to the
full Exchange, so you can select and extract the precise information you need, format it in
a custom manner and return it. The return value will become the final log message.</p>
+
+<p>You can have the Log component pick up your custom <tt>ExchangeFormatter</tt>
in either of two ways:</p>
+
+<p><b>Explicitly instantiating the LogComponent in your Registry:</b></p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean name=<span class="code-quote">"log"</span> class=<span class="code-quote">"org.apache.camel.component.log.LogComponent"</span>&gt;
+   &lt;property name=<span class="code-quote">"exchangeFormatter"</span>
ref=<span class="code-quote">"myCustomFormatter"</span> /&gt;
+&lt;/bean&gt;
+</pre>
+</div></div>
+
+<p><b>Convention over configuration:</b></p>
+
+<p>Simply by registering a bean with the name <tt>logFormatter</tt>; the
Log Component is intelligent enough to pick it up automatically.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean name=<span class="code-quote">"logFormatter"</span> class=<span
class="code-quote">"com.xyz.MyCustomExchangeFormatter"</span> /&gt;
+</pre>
+</div></div>
+
+<p>NOTE: the <tt>ExchangeFormatter</tt> gets applied to <b>all Log
endpoints within that Camel Context</b>. If you need different ExchangeFormatters for
different endpoints, just instantiate the LogComponent as many times as needed, and use the
relevant bean name as the endpoint prefix.</p>
 
 <h3><a shape="rect" name="BookInOnePage-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring
Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a
shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a
shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
 
 <ul><li><a shape="rect" href="tracer.html" title="Tracer">Tracer</a></li><li><a
shape="rect" href="how-do-i-use-log4j.html" title="How do I use log4j">How do I use log4j</a></li><li><a
shape="rect" href="how-do-i-use-java-14-logging.html" title="How do I use Java 1.4 logging">How
do I use Java 1.4 logging</a></li><li><a shape="rect" href="logeip.html"
title="LogEIP">LogEIP</a> for using <tt>log</tt> directly in the DSL
for human logs.</li></ul>
 
-
 <h2><a shape="rect" name="BookInOnePage-Lucene%28IndexerandSearch%29Component"></a>Lucene
(Indexer and Search) Component</h2>
 
 <p><b>Available as of Camel 2.2</b></p>

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/log.html
==============================================================================
--- websites/production/camel/content/log.html (original)
+++ websites/production/camel/content/log.html Thu Mar 28 01:27:42 2013
@@ -192,12 +192,56 @@ to(<span class="code-quote">"log:com.myc
 </pre>
 </div></div>
 
+<h3><a shape="rect" name="Log-Fullcustomizationoftheloggingoutput"></a>Full
customization of the logging output</h3>
+
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>With the options outlined in the <a shape="rect" href="#Log-Formatting">Formatting</a>
section, you can control much of the output of the logger. However, log lines will always
follow this structure:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+Exchange[Id:ID-machine-local-50656-1234567901234-1-2, ExchangePattern:InOut, 
+Properties:{CamelToEndpoint=log:<span class="code-comment">//org.apache.camel.component.log.TEST?showAll=<span
class="code-keyword">true</span>, 
+</span>CamelCreatedTimestamp=Thu Mar 28 00:00:00 WET 2013}, 
+Headers:{breadcrumbId=ID-machine-local-50656-1234567901234-1-1}, BodyType:<span class="code-object">String</span>,
Body:Hello World, Out: <span class="code-keyword">null</span>]
+</pre>
+</div></div>
+
+<p>This format is unsuitable in some cases, perhaps because you need to...</p>
+
+<ul><li>... filter the headers and properties that are printed, to strike a balance
between insight and verbosity.</li><li>... adjust the log message to whatever
you deem most readable.</li><li>... tailor log messages for digestion by log mining
systems, e.g. Splunk.</li><li>... print specific body types differently.</li><li>...
etc.</li></ul>
+
+
+<p>Whenever you require absolute customization, you can create a class that implements
the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/ExchangeFormatter.html"><tt>ExchangeFormatter</tt></a>
interface. Within the <tt>format(Exchange)</tt> method you have access to the
full Exchange, so you can select and extract the precise information you need, format it in
a custom manner and return it. The return value will become the final log message.</p>
+
+<p>You can have the Log component pick up your custom <tt>ExchangeFormatter</tt>
in either of two ways:</p>
+
+<p><b>Explicitly instantiating the LogComponent in your Registry:</b></p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean name=<span class="code-quote">"log"</span> class=<span class="code-quote">"org.apache.camel.component.log.LogComponent"</span>&gt;
+   &lt;property name=<span class="code-quote">"exchangeFormatter"</span>
ref=<span class="code-quote">"myCustomFormatter"</span> /&gt;
+&lt;/bean&gt;
+</pre>
+</div></div>
+
+<p><b>Convention over configuration:</b></p>
+
+<p>Simply by registering a bean with the name <tt>logFormatter</tt>; the
Log Component is intelligent enough to pick it up automatically.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+&lt;bean name=<span class="code-quote">"logFormatter"</span> class=<span
class="code-quote">"com.xyz.MyCustomExchangeFormatter"</span> /&gt;
+</pre>
+</div></div>
+
+<p>NOTE: the <tt>ExchangeFormatter</tt> gets applied to <b>all Log
endpoints within that Camel Context</b>. If you need different ExchangeFormatters for
different endpoints, just instantiate the LogComponent as many times as needed, and use the
relevant bean name as the endpoint prefix.</p>
 
 <h3><a shape="rect" name="Log-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring
Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a
shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a
shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
 
 <ul><li><a shape="rect" href="tracer.html" title="Tracer">Tracer</a></li><li><a
shape="rect" href="how-do-i-use-log4j.html" title="How do I use log4j">How do I use log4j</a></li><li><a
shape="rect" href="how-do-i-use-java-14-logging.html" title="How do I use Java 1.4 logging">How
do I use Java 1.4 logging</a></li><li><a shape="rect" href="logeip.html"
title="LogEIP">LogEIP</a> for using <tt>log</tt> directly in the DSL
for human logs.</li></ul>
-
 </div>
         </td>
         <td valign="top">



Mime
View raw message