You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2014/04/08 10:21:54 UTC

svn commit: r905430 - in /websites/production/camel/content: cache/main.pageCache log.html logeip.html

Author: buildbot
Date: Tue Apr  8 08:21:54 2014
New Revision: 905430

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/log.html
    websites/production/camel/content/logeip.html

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 Tue Apr  8 08:21:54 2014
@@ -90,7 +90,14 @@
 </p><ul><li><a shape="rect" class="external-link" href="http://logging.apache.org/log4j/">Log4j</a></li><li><a shape="rect" class="external-link" href="http://logback.qos.ch/" rel="nofollow">Logback</a></li><li><a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/package-summary.html" rel="nofollow">JDK Util Logging logging</a></li></ul><h3 id="Log-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[log:loggingCategory[?options]
 ]]></script>
-</div></div><p>Where <strong>loggingCategory</strong> is the name of the logging category to use. You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><p>For example, a log endpoint typically specifies the logging level using the <code>level</code> option, as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Where <strong>loggingCategory</strong> is the name of the logging category to use. You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p>    <div class="aui-message hint shadowed information-macro">
+                    <p class="title">Using Logger instance from the the Registry</p>
+                            <span class="aui-icon icon-hint">Icon</span>
+                <div class="message-content">
+                            <p>As of <strong>Camel 2.12.4/2.13.1</strong>, if there's single instance of&#160;<code>org.slf4j.Logger</code> found in the Registry, the <strong>loggingCategory</strong> is no longer used to create logger instance. The registered instance is used instead. Also it is possible to reference particular&#160;<code>Logger</code> instance using&#160;<code>?logger=#myLogger</code> URI parameter. Eventually, if there's no registered and URI&#160;<code>logger</code> parameter, the logger instance is created using <strong>loggingCategory</strong>.</p>
+                    </div>
+    </div>
+<p>For example, a log endpoint typically specifies the logging level using the <code>level</code> option, as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[log:org.apache.camel.example?level=DEBUG
 ]]></script>
 </div></div><p>The default logger logs every exchange (<em>regular logging</em>). But Camel also ships with the <code>Throughput</code> logger, which is used whenever the <code>groupSize</code> option is specified.</p>    <div class="aui-message success shadowed information-macro">
@@ -101,7 +108,7 @@
                     </div>
     </div>
 <h3 id="Log-Options">Options</h3><div class="confluenceTableSmall">
-<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> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>level</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>INFO</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Logging level to use. Possible values: <code>ERROR</code>, <code>WARN</code>, <code>INFO</code>, <code>DEBUG</code>, <code>TRACE</code>, <code>OFF</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>marker</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="c
 onfluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.9:</strong> An optional <a shape="rect" class="external-link" href="http://www.slf4j.org/api/org/slf4j/Marker.html" rel="nofollow">Marker</a> name to use. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>groupSize</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> An integer that specifies a group size for throughput logging.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>groupInterval</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If specified will group
  message stats by this time interval (in millis) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>groupDelay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Set the initial delay for stats (in millis) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>groupActiveOnly</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic </p></td></tr></tbody></table>
+<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> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>level</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>INFO</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Logging level to use. Possible values: <code>ERROR</code>, <code>WARN</code>, <code>INFO</code>, <code>DEBUG</code>, <code>TRACE</code>, <code>OFF</code> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>marker</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="c
 onfluenceTd"><p> <code>String</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.9:</strong> An optional <a shape="rect" class="external-link" href="http://www.slf4j.org/api/org/slf4j/Marker.html" rel="nofollow">Marker</a> name to use. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>groupSize</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> An integer that specifies a group size for throughput logging.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>groupInterval</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If specified will group
  message stats by this time interval (in millis) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>groupDelay</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Set the initial delay for stats (in millis) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>groupActiveOnly</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>logger</code> </p></td><td colspan="1" rowspan="
 1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Logger</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.12.4/2.13.1:</strong> An optional reference to <a shape="rect" class="external-link" href="http://www.slf4j.org/api/org/slf4j/Logger.html" rel="nofollow">org.slf4j.Logger</a> from Registry to use. </p></td></tr></tbody></table>
 </div><p><strong>note</strong>: groupDelay and groupActiveOnly are only applicable when using groupInterval</p><h3 id="Log-Formatting">Formatting</h3><p>The log formats the execution of exchanges to log lines. <br clear="none"> By default, the log uses <code>LogFormatter</code> to format the log output, where <code>LogFormatter</code> has the following options:</p><div class="confluenceTableSmall">
 <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> <code>showAll</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Quick option for turning all options on. (multiline, maxChars has to be manually set if to be used) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showExchangeId</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Show the unique exchange ID. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showExchangePattern</code> </p></td><td colspan="1" rowspan="1" clas
 s="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Shows the Message Exchange Pattern (or MEP for short). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showProperties</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Show the exchange properties. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showHeaders</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Show the In message headers. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>skipBodyLineSeparator</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.12.2:</strong> Whether to skip line s
 eparators when logging the message body. This allows to log the message body in one line, setting this option to <code>false</code> will preserve any line separators from the body, which then will log the body <em>as is</em>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showBodyType</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Show the In body Java type. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showBody</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Show the In body. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showOut</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If the exchange 
 has an Out message, show the Out message. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showException</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If the exchange has an exception, show the exception message (no stack trace). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showCaughtException</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> If the exchange has a caught exception, show the exception message (no stack trace). A caught exception is stored as a property on the exchange (using the key <code>Exchange.EXCEPTION_CAUGHT</code>) and for instance a <code>doCatch</code> can catch exceptions. See <a shape="rect" href="try-catch-finally.html" title="Try Catch Finally">Try Catch Finally</a>. </p></td></tr><tr><td colspa
 n="1" rowspan="1" class="confluenceTd"><p> <code>showStackTrace</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Show the stack trace, if an exchange has an exception. Only effective if one of <code>showAll</code>, <code>showException</code> or <code>showCaughtException</code> are enabled. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showFiles</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.9:</strong> Whether Camel should show file bodies or not (eg such as java.io.File). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showFuture</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether Camel should show <cod
 e>java.util.concurrent.Future</code> bodies or not. If enabled Camel could potentially wait until the <code>Future</code> task is done. Will by default not wait. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>showStreams</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Whether Camel should show stream bodies or not (eg such as java.io.InputStream). Beware if you enable this option then you may not be able later to access the message body as the stream have already been read by this logger. To remedy this you will have to use <a shape="rect" href="stream-caching.html" title="Stream caching">Stream caching</a>. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>multiline</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="co
 nfluenceTd"><p> If <code>true</code>, each piece of information is logged on a new line. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>maxChars</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Limits the number of characters logged per line. The default value is <code>10000</code> from <strong>Camel 2.9</strong> onwards. </p></td></tr></tbody></table>
 </div>    <div class="aui-message success shadowed information-macro">
@@ -161,7 +168,7 @@ Headers:{breadcrumbId=ID-machine-local-5
 ...
 &lt;to uri=&quot;log:bar?param1=bar&amp;amp;param2=200&quot;/&gt;
 ]]></script>
-</div></div><p></p><h3 id="Log-SeeAlso">See Also</h3>
+</div></div><h4 id="Log-UsingLogcomponentinOSGi">Using Log component in OSGi</h4><p><strong>Improvement as of Camel 2.12.4/2.13.1</strong></p><p>When using&#160;Log component inside OSGi (e.g., in Karaf), the underlying logging mechanisms are provided by PAX logging. It searches for a bundle which invokes&#160;<code>org.slf4j.LoggerFactory.getLogger()</code> method and associates the bundle with the logger instance. Without specifying custom&#160;<code>org.sfl4j.Logger</code> instance, the logger created by Log component is associated with <code>camel-core</code> bundle.</p><p>In some scenarios it is required that the bundle associated with logger should be the bundle which contains route definition. To do this, either register single instance of&#160;<code>org.slf4j.Logger</code> in the Registry or reference it using&#160;<code>logger</code> URI parameter.</p><p></p><h3 id="Log-SeeAlso">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul><ul><li><a shape="rect" href="tracer.html">Tracer</a></li><li><a shape="rect" href="how-do-i-use-log4j.html">How do I use log4j</a></li><li><a shape="rect" href="how-do-i-use-java-14-logging.html">How do I use Java 1.4 logging</a></li><li><a shape="rect" href="logeip.html">LogEIP</a> for using <code>log</code> directly in the DSL for human logs.</li></ul></div>
         </td>
         <td valign="top">

Modified: websites/production/camel/content/logeip.html
==============================================================================
--- websites/production/camel/content/logeip.html (original)
+++ websites/production/camel/content/logeip.html Tue Apr  8 08:21:54 2014
@@ -95,6 +95,13 @@
                             <p>The <code>log</code> DSL is much lighter and meant for logging human logs such as <code>Starting to do ...</code> etc. It can only log a message based on the <a shape="rect" href="simple.html">Simple</a> language. On the other hand <a shape="rect" href="log.html">Log</a> component is a full fledged component which involves using endpoints and etc. The <a shape="rect" href="log.html">Log</a> component is meant for logging the Message itself and you have many URI options to control what you would like to be logged.</p>
                     </div>
     </div>
+    <div class="aui-message hint shadowed information-macro">
+                    <p class="title">Using Logger instance from the the Registry</p>
+                            <span class="aui-icon icon-hint">Icon</span>
+                <div class="message-content">
+                            <p>As of <strong>Camel 2.12.4/2.13.1</strong>, if no logger name or logger instance is passed to log DSL, there's a Registry lookup performed to find single instance of&#160;<code>org.slf4j.Logger</code>. If such instance is found, it is used instead of creating a new logger instance. If more instances are found, the behavior defaults to creating a new instance of logger.</p>
+                    </div>
+    </div>
     <div class="aui-message success shadowed information-macro">
                     <p class="title">Logging message body with streamed messages</p>
                             <span class="aui-icon icon-success">Icon</span>