You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2019/07/02 11:57:27 UTC

svn commit: r1047092 - in /websites/production/cxf/content: cache/docs.pageCache docs/message-logging.html

Author: buildbot
Date: Tue Jul  2 11:57:26 2019
New Revision: 1047092

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/message-logging.html

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

Modified: websites/production/cxf/content/docs/message-logging.html
==============================================================================
--- websites/production/cxf/content/docs/message-logging.html (original)
+++ websites/production/cxf/content/docs/message-logging.html Tue Jul  2 11:57:26 2019
@@ -99,15 +99,7 @@ Apache CXF -- Message Logging
                 <div id="wrapper-menu-page-bottom">
                   <div id="menu-page">
                     <!-- NavigationBar -->
-<div id="navigation"><ul class="alternate"><li><a shape="rect" href="overview.html">Overview</a></li><li><a shape="rect" href="how-tos.html">How-Tos</a></li><li><a shape="rect" href="frontends.html">Frontends</a></li><li><a shape="rect" href="databindings.html">DataBindings</a></li><li><a shape="rect" href="transports.html">Transports</a></li><li><a shape="rect" href="configuration.html">Configuration</a></li><li><a shape="rect" href="debugging-and-logging.html">Debugging and Logging</a></li><li><a shape="rect" href="tools.html">Tools</a></li><li><a shape="rect" href="restful-services.html">RESTful Services</a></li><li><a shape="rect" href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect" href="service-routing.html">Service Routing</a></li><li><a shape="rect" href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect" href="ws-support.html">WS-* Support</a></li><li><a shape="rect" href="advanced-integration.html">Advanced Integration</a></li><li><a shape
 ="rect" href="deployment.html">Deployment</a></li><li><a shape="rect" href="schemas-and-namespaces.html">Use of Schemas and Namespaces</a></li></ul><hr><ul class="alternate"><li><p>Search</p></li></ul><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
-  <div>
-    <input type="hidden" name="cx" value="002890367768291051730:o99qiwa09y4">
-    <input type="hidden" name="ie" value="UTF-8">
-    <input type="text" name="q" size="21">
-    <input type="submit" name="sa" value="Search">
-  </div>
-</form>
-<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script><hr><ul class="alternate"><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest/">API 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p>&#160;</p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
+<div id="navigation"><ul class="alternate"><li><a shape="rect" href="overview.html">Overview</a></li><li><a shape="rect" href="how-tos.html">How-Tos</a></li><li><a shape="rect" href="frontends.html">Frontends</a></li><li><a shape="rect" href="databindings.html">DataBindings</a></li><li><a shape="rect" href="transports.html">Transports</a></li><li><a shape="rect" href="configuration.html">Configuration</a></li><li><a shape="rect" href="debugging-and-logging.html">Debugging and Logging</a></li><li><a shape="rect" href="tools.html">Tools</a></li><li><a shape="rect" href="restful-services.html">RESTful Services</a></li><li><a shape="rect" href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect" href="service-routing.html">Service Routing</a></li><li><a shape="rect" href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect" href="ws-support.html">WS-* Support</a></li><li><a shape="rect" href="advanced-integration.html">Advanced Integration</a></li><li><a shape
 ="rect" href="deployment.html">Deployment</a></li><li><a shape="rect" href="schemas-and-namespaces.html">Use of Schemas and Namespaces</a></li></ul><hr><ul class="alternate"><li><p>Search</p></li></ul><div class="aui-message aui-message-error"><p class="title"><strong>Error rendering macro 'html'</strong></p><p>Your Confluence administrator has disallowed the use of Javascript in the HTML macro.  This setting can be changed using  HTML for Confluence Configuration.  Please see your administrator for details.</p></div><hr><ul class="alternate"><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest/">API 3.2.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x (Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF Website</a></li></ul><p>&#160;</p><p><a shape="rect" class="external-link" href="http://www.apache.org/events/current-event.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-em
 bedded-image confluence-external-resource" src="http://www.apache.org/events/current-event-125x125.png" data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
                     <!-- NavigationBar -->
                   </div>
               </div>
@@ -118,23 +110,23 @@ Apache CXF -- Message Logging
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><div class="container" title="Hint: double-click to select code"><p>Since CXF 3.1 the message logging code was moved into a separate module and gathered some new features.</p><ul><li>Auto logging for existing CXF endpoints and clients</li><li>Uses slf4j MDC to log meta data separately</li><li>Adds meta data for Rest calls</li><li>Adds MD5 message id and exchange id for correlation</li><li>Simple interface for writing your own appenders</li></ul><h2 id="MessageLogging-ManualUsage">Manual Usage</h2><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>CXF LoggingFeature</b></div><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">    &lt;jaxws:endpoint ...&gt;
+<pre class="brush: xml; gutter: false; theme: Default">    &lt;jaxws:endpoint ...&gt;
       &lt;jaxws:features&gt;
        &lt;bean class="org.apache.cxf.ext.logging.LoggingFeature"/&gt;
       &lt;/jaxws:features&gt;
     &lt;/jaxws:endpoint&gt;</pre>
-</div></div><p>The LoggingFeature can be used with JAXWS as well JAXRS Endpoints and Clients. It can also be specified using the @Features annotation. The feature should be used instead of adding the LoggingIn/OutInterceptors manually.</p><h2 id="MessageLogging-Properties">Properties</h2><p>The following properties can be set on the LoggingFeature:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Property</th><th colspan="1" rowspan="1" class="confluenceTh">Explanation</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">limit</td><td colspan="1" rowspan="1" class="confluenceTd">The size limit at which messages are truncated in the log. The default is 48 * 1024.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">inMemThreshold</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Size limit when messages are written to disk. The default is -1, which means do not write to disk.</p></td></tr><tr
 ><td colspan="1" rowspan="1" class="confluenceTd">prettyLogging</td><td colspan="1" rowspan="1" class="confluenceTd">For XML content, turn on pretty printing in the logs. The default is false.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">logBinary</td><td colspan="1" rowspan="1" class="confluenceTd">Log binary payloads by default. The default is false.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">logMultipart</td><td colspan="1" rowspan="1" class="confluenceTd">Log multipart payloads by default. The default is true.</td></tr></tbody></table></div><p>&#160;</p><h2 id="MessageLogging-Slf4jMDCvaluesformetadata">Slf4j MDC values for meta data</h2><p>This is the raw logging information you get for a SOAP call:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Field</th><th colspan="1" rowspan="1" class="confluenceTh">Value</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">@ti
 mestamp</td><td colspan="1" rowspan="1" class="confluenceTd">2015-06-08T14:43:27,097Z</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.address</td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://localhost:8181/cxf/personService" rel="nofollow">http://localhost:8181/cxf/personService</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://MDC.bundle.id" rel="nofollow">MDC.bundle.id</a></td><td colspan="1" rowspan="1" class="confluenceTd">90</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://MDC.bundle.name" rel="nofollow">MDC.bundle.name</a></td><td colspan="1" rowspan="1" class="confluenceTd">org.apache.cxf.cxf-rt-features-logging</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.bundle.version</td><td colspan="1" rowspan="1" class="confluenceTd">3.1.0</td></tr><tr><td colspan="
 1" rowspan="1" class="confluenceTd">MDC.content-type</td><td colspan="1" rowspan="1" class="confluenceTd">text/xml; charset=UTF-8</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.encoding</td><td colspan="1" rowspan="1" class="confluenceTd">UTF-8</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.exchangeId</td><td colspan="1" rowspan="1" class="confluenceTd">56b037e3-d254-4fe5-8723-f442835fa128</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.headers</td><td colspan="1" rowspan="1" class="confluenceTd">{content-type=text/xml; charset=UTF-8, connection=keep-alive, Host=localhost:8181, Content-Length=251, SOAPAction="", User-Agent=Apache CXF 3.1.0, Accept=*/*, Pragma=no-cache, Cache-Control=no-cache}</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.httpMethod</td><td colspan="1" rowspan="1" class="confluenceTd">POST</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.messageId</td><td colspan="1" rowspan=
 "1" class="confluenceTd">a46eebd2-60af-4975-ba42-8b8205ac884c</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.portName</td><td colspan="1" rowspan="1" class="confluenceTd">PersonServiceImplPort</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.portTypeName</td><td colspan="1" rowspan="1" class="confluenceTd">PersonService</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.serviceName</td><td colspan="1" rowspan="1" class="confluenceTd">PersonServiceImplService</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.type</td><td colspan="1" rowspan="1" class="confluenceTd">REQ_IN</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">level</td><td colspan="1" rowspan="1" class="confluenceTd">INFO</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loc.class</td><td colspan="1" rowspan="1" class="confluenceTd">org.apache.cxf.ext.logging.slf4j.Slf4jEventSender</td></tr><tr><td colspan="1" rowspan="1" class="con
 fluenceTd">loc.file</td><td colspan="1" rowspan="1" class="confluenceTd">Slf4jEventSender.java</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loc.line</td><td colspan="1" rowspan="1" class="confluenceTd">55</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loc.method</td><td colspan="1" rowspan="1" class="confluenceTd">send</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loggerClass</td><td colspan="1" rowspan="1" class="confluenceTd">org.ops4j.pax.logging.slf4j.Slf4jLogger</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loggerName</td><td colspan="1" rowspan="1" class="confluenceTd">org.apache.cxf.services.PersonService.REQ_IN</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">message</td><td colspan="1" rowspan="1" class="confluenceTd">&lt;soap:Envelope xmlns:soap="<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/soap/envelope/%22%3E%3Csoap:Body%3E%3Cns2:getAll" rel="nofollow">http://schemas.xm
 lsoap.org/soap/envelope/"&gt;&lt;soap:Body&gt;&lt;ns2:getAll</a> xmlns:ns2="<a shape="rect" class="external-link" href="http://model.personservice.cxf.karaf.tutorial.lr.net/%22" rel="nofollow">http://model.personservice.cxf.karaf.tutorial.lr.net/"</a>; xmlns:ns3="<a shape="rect" class="external-link" href="http://person.jms2rest.camel.karaf.tutorial.lr.net%22/%3E%3C/soap:Body%3E%3C/soap:Envelope%3E" rel="nofollow">http://person.jms2rest.camel.karaf.tutorial.lr.net"/&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;</a>;</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">threadName</td><td colspan="1" rowspan="1" class="confluenceTd">qtp80604361-78</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">timeStamp</td><td colspan="1" rowspan="1" class="confluenceTd">1433774607097</td></tr></tbody></table></div><p><br clear="none">A lot of the details are in the MDC values which are by default normally not displayed in the log file. You need to change your pax logging config
  to make these visible.ogged or log some services to another file.</p><h2 id="MessageLogging-Enablling/disablingloggingbychangingtheloggerconfig">Enablling / disabling logging by changing the logger config</h2><p>The logger name is "&lt;service namespace&gt;.&lt;ServiceName&gt;.&lt;type&gt;". In the karaf log file it by default only shows the type but you can change this.</p><p>You can use the logger name to fine tune which services you want to log this way. For example set the debug level to WARN for noisy services to avoid that they are logged.</p><h2 id="MessageLogging-Messageidandexchangeid">Message id and exchange id</h2><p>The messageId allows to uniquely identify messages even if they were collected from several servers. It is also transported over the wire so a request sent on one machine can be correlated with the request received on another machine.</p><p>The exchangeId will be the same for an incoming request and the response sent out or on the other side for an outgoing 
 request and the response for it. This allows to correlate request and responses and so follow the conversations.</p><h2 id="MessageLogging-Simpleinterfacetowritecustomappenders">Simple interface to write custom appenders</h2><p>Write a custom <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/LogEventSender.java" rel="nofollow">LogSender</a> and set it on the <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingFeature.java" rel="nofollow">LoggingFeature</a> to do custom logging. All meta data can be access from the class <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/LogEvent.java" rel="nofollow">LogEvent</a>.</p><h2 id="MessageLogging-AutologgingforexistingCXFendpointsandclient
 sinApacheKaraf">Auto logging for existing CXF endpoints and clients in Apache Karaf</h2><p>To use the message logging in karaf it needs to be installed as a feature. It can then be activated for all endpoints using a config.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Logging feature in karaf</b></div><div class="codeContent panelContent pdl">
-<pre class="brush: bash; gutter: false; theme: Default" style="font-size:12px;">feature:repo-add cxf 3.1.0
+</div></div><p>The LoggingFeature can be used with JAXWS as well JAXRS Endpoints and Clients. It can also be specified using the @Features annotation. The feature should be used instead of adding the LoggingIn/OutInterceptors manually.</p><h2 id="MessageLogging-Properties">Properties</h2><p>The following properties can be set on the LoggingFeature:</p><div class="table-wrap"><table class="confluenceTable"><colgroup span="1"><col span="1"><col span="1"></colgroup><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Property</th><th colspan="1" rowspan="1" class="confluenceTh">Explanation</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">limit</td><td colspan="1" rowspan="1" class="confluenceTd">The size limit at which messages are truncated in the log. The default is 48 * 1024.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">inMemThreshold</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Size limit when messages are written to disk. The default
  is -1, which means do not write to disk.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">prettyLogging</td><td colspan="1" rowspan="1" class="confluenceTd">For XML content, turn on pretty printing in the logs. The default is false.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">logBinary</td><td colspan="1" rowspan="1" class="confluenceTd">Log binary payloads by default. The default is false.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">logMultipart</td><td colspan="1" rowspan="1" class="confluenceTd">Log multipart payloads by default. The default is true.</td></tr></tbody></table></div><p><br clear="none"></p><h2 id="MessageLogging-Slf4jMDCvaluesformetadata">Slf4j MDC values for meta data</h2><p>This is the raw logging information you get for a SOAP call:</p><div class="table-wrap"><table class="confluenceTable"><colgroup span="1"><col span="1"><col span="1"></colgroup><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Fie
 ld</th><th colspan="1" rowspan="1" class="confluenceTh">Value</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">@timestamp</td><td colspan="1" rowspan="1" class="confluenceTd">2015-06-08T14:43:27,097Z</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.address</td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://localhost:8181/cxf/personService" rel="nofollow">http://localhost:8181/cxf/personService</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://MDC.bundle.id" rel="nofollow">MDC.bundle.id</a></td><td colspan="1" rowspan="1" class="confluenceTd">90</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://MDC.bundle.name" rel="nofollow">MDC.bundle.name</a></td><td colspan="1" rowspan="1" class="confluenceTd">org.apache.cxf.cxf-rt-features-logging</td></tr><tr><td colspan="1" rowspan="1
 " class="confluenceTd">MDC.bundle.version</td><td colspan="1" rowspan="1" class="confluenceTd">3.1.0</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.content-type</td><td colspan="1" rowspan="1" class="confluenceTd">text/xml; charset=UTF-8</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.encoding</td><td colspan="1" rowspan="1" class="confluenceTd">UTF-8</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.exchangeId</td><td colspan="1" rowspan="1" class="confluenceTd">56b037e3-d254-4fe5-8723-f442835fa128</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.headers</td><td colspan="1" rowspan="1" class="confluenceTd">{content-type=text/xml; charset=UTF-8, connection=keep-alive, Host=localhost:8181, Content-Length=251, SOAPAction="", User-Agent=Apache CXF 3.1.0, Accept=*/*, Pragma=no-cache, Cache-Control=no-cache}</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.httpMethod</td><td colspan="1" rowspan="1" cla
 ss="confluenceTd">POST</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.messageId</td><td colspan="1" rowspan="1" class="confluenceTd">a46eebd2-60af-4975-ba42-8b8205ac884c</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.portName</td><td colspan="1" rowspan="1" class="confluenceTd">PersonServiceImplPort</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.portTypeName</td><td colspan="1" rowspan="1" class="confluenceTd">PersonService</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.serviceName</td><td colspan="1" rowspan="1" class="confluenceTd">PersonServiceImplService</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MDC.type</td><td colspan="1" rowspan="1" class="confluenceTd">REQ_IN</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">level</td><td colspan="1" rowspan="1" class="confluenceTd">INFO</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loc.class</td><td colspan="1" rowspan
 ="1" class="confluenceTd">org.apache.cxf.ext.logging.slf4j.Slf4jEventSender</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loc.file</td><td colspan="1" rowspan="1" class="confluenceTd">Slf4jEventSender.java</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loc.line</td><td colspan="1" rowspan="1" class="confluenceTd">55</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loc.method</td><td colspan="1" rowspan="1" class="confluenceTd">send</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loggerClass</td><td colspan="1" rowspan="1" class="confluenceTd">org.ops4j.pax.logging.slf4j.Slf4jLogger</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">loggerName</td><td colspan="1" rowspan="1" class="confluenceTd">org.apache.cxf.services.PersonService.REQ_IN</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">message</td><td colspan="1" rowspan="1" class="confluenceTd">&lt;soap:Envelope xmlns:soap="<a shape="rect" class="ext
 ernal-link" href="http://schemas.xmlsoap.org/soap/envelope/%22%3E%3Csoap:Body%3E%3Cns2:getAll" rel="nofollow">http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soap:Body&gt;&lt;ns2:getAll</a> xmlns:ns2="<a shape="rect" class="external-link" href="http://model.personservice.cxf.karaf.tutorial.lr.net/%22" rel="nofollow">http://model.personservice.cxf.karaf.tutorial.lr.net/"</a>; xmlns:ns3="<a shape="rect" class="external-link" href="http://person.jms2rest.camel.karaf.tutorial.lr.net%22/%3E%3C/soap:Body%3E%3C/soap:Envelope%3E" rel="nofollow">http://person.jms2rest.camel.karaf.tutorial.lr.net"/&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;</a>;</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">threadName</td><td colspan="1" rowspan="1" class="confluenceTd">qtp80604361-78</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">timeStamp</td><td colspan="1" rowspan="1" class="confluenceTd">1433774607097</td></tr></tbody></table></div><p><br clear="none">A lot of the detail
 s are in the MDC values which are by default normally not displayed in the log file. You need to change your pax logging config to make these visible.ogged or log some services to another file.</p><h2 id="MessageLogging-Enablling/disablingloggingbychangingtheloggerconfig">Enablling / disabling logging by changing the logger config</h2><p>The logger name is "&lt;service namespace&gt;.&lt;ServiceName&gt;.&lt;type&gt;". In the karaf log file it by default only shows the type but you can change this.</p><p>You can use the logger name to fine tune which services you want to log this way. For example set the debug level to WARN for noisy services to avoid that they are logged.</p><h2 id="MessageLogging-Messageidandexchangeid">Message id and exchange id</h2><p>The messageId allows to uniquely identify messages even if they were collected from several servers. It is also transported over the wire so a request sent on one machine can be correlated with the request received on another machine
 .</p><p>The exchangeId will be the same for an incoming request and the response sent out or on the other side for an outgoing request and the response for it. This allows to correlate request and responses and so follow the conversations.</p><h2 id="MessageLogging-Simpleinterfacetowritecustomappenders">Simple interface to write custom appenders</h2><p>Write a custom <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/LogEventSender.java" rel="nofollow">LogEventSender</a> and set it on the <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingFeature.java" rel="nofollow">LoggingFeature</a> to do custom logging. All meta data can be accessed from the class <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/logging/src/main/java/org/apache/c
 xf/ext/logging/event/LogEvent.java" rel="nofollow">LogEvent</a>.</p><h2 id="MessageLogging-AutologgingforexistingCXFendpointsandclientsinApacheKaraf">Auto logging for existing CXF endpoints and clients in Apache Karaf</h2><p>To use the message logging in karaf it needs to be installed as a feature. It can then be activated for all endpoints using a config.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Logging feature in karaf</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: bash; gutter: false; theme: Default">feature:repo-add cxf 3.1.0
 feature:install cxf-features-logging
 config:property-set -p org.apache.cxf.features.logging enabled true</pre>
 </div></div><p>Any CXF endpoints installed after the logging feature will automatically be enhanced with the message logging feature.</p>By default then all SOAP and Rest calls will be logged using slf4j. So the logging data will be processed by pax logging and by default end up in your karaf log.<p>A log entry looks like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Sample Log entry</b></div><div class="codeContent panelContent pdl">
-<pre class="brush: bash; gutter: false; theme: Default" style="font-size:12px;">2015-06-08 16:35:54,068 | INFO  | qtp1189348109-73 | REQ_IN                           | 90 - org.apache.cxf.cxf-rt-features-logging - 3.1.0 | &lt;soap:Envelope 
+<pre class="brush: bash; gutter: false; theme: Default">2015-06-08 16:35:54,068 | INFO  | qtp1189348109-73 | REQ_IN                           | 90 - org.apache.cxf.cxf-rt-features-logging - 3.1.0 | &lt;soap:Envelope 
 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soap:Body&gt;&lt;ns2:addPerson xmlns:ns2="http://model.personservice.cxf.karaf.tutorial.lr.net/" 
 xmlns:ns3="http://person.jms2rest.camel.karaf.tutorial.lr.net"&gt;&lt;arg0&gt;&lt;id&gt;3&lt;/id&gt;&lt;name&gt;Test2&lt;/name&gt;&lt;url&gt;&lt;/url&gt;&lt;/arg0&gt;&lt;/ns2:addPerson&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;</pre>
 </div></div><p>This does not look very informative. You only see that it is an incoming request (REQ_IN) and the SOAP message in the log message. The logging feature provides a lot more information though. To leverage these the pax logging config can be changed to show the relevant MDC values.</p><h2 id="MessageLogging-Karafdecantersupporttowriteintoelasticsearch">Karaf decanter support to write into elastic search</h2><p>Many people use elastic search for their logging. Fortunately you do not have to write a special LogSender for this purpose. The standard CXF logging feature will already work.</p><p>It works like this:</p><ul><li>CXF sends the messages as slf4j events which are processed by pax logging</li><li>Karaf Decanter LogCollector attaches to pax logging and sends all log events into the karaf message bus (EventAdmin topics)</li><li>Karaf Decanter ElasticSearchAppender sends the log events to a configurable elastic search instance</li></ul><p>As Decanter also provides featu
 res for a local elastic search and kibana instance you are ready to go in just minutes.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Installing Decanter for CXF Logging</b></div><div class="codeContent panelContent pdl">
-<pre class="brush: bash; gutter: false; theme: Default" style="font-size:12px;">feature:repo-add mvn:org.apache.karaf.decanter/apache-karaf-decanter/3.0.0-SNAPSHOT/xml/features
+<pre class="brush: bash; gutter: false; theme: Default">feature:repo-add mvn:org.apache.karaf.decanter/apache-karaf-decanter/3.0.0-SNAPSHOT/xml/features
 feature:install decanter-collector-log decanter-appender-elasticsearch elasticsearch kibana</pre>
-</div></div><p><br clear="none">After that open a browser at <a shape="rect" class="external-link" href="http://localhost:8181/kibana" rel="nofollow">http://localhost:8181/kibana</a>. When decanter is released kibana will be fully set up. At the moment you have to add the logstash dashboard and change the index name to <strong>[karaf-]YYYY.MM.DD</strong>.</p><p>Then you should see your cxf messages like this:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://www.liquid-reality.de/download/attachments/13860866/Screenshot%20from%202015-06-08%2017%3A21%3A20.png?version=1&amp;modificationDate=1433777354000&amp;api=v2" data-image-src="http://www.liquid-reality.de/download/attachments/13860866/Screenshot%20from%202015-06-08%2017%3A21%3A20.png?version=1&amp;modificationDate=1433777354000&amp;api=v2"></span></p><p>Kibana easily allows to filter for specific services and correlate requests and responses.</p><p
 >This is just a preview of decanter. I will do a more detailed post when the first release is out.</p><br clear="none"><br clear="none"><p>&#160;</p></div></div>
+</div></div><p><br clear="none">After that open a browser at <a shape="rect" class="external-link" href="http://localhost:8181/kibana" rel="nofollow">http://localhost:8181/kibana</a>. When decanter is released kibana will be fully set up. At the moment you have to add the logstash dashboard and change the index name to <strong>[karaf-]YYYY.MM.DD</strong>.</p><p>Then you should see your cxf messages like this:</p><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://www.liquid-reality.de/download/attachments/13860866/Screenshot%20from%202015-06-08%2017%3A21%3A20.png?version=1&amp;modificationDate=1433777354000&amp;api=v2" data-image-src="http://www.liquid-reality.de/download/attachments/13860866/Screenshot%20from%202015-06-08%2017%3A21%3A20.png?version=1&amp;modificationDate=1433777354000&amp;api=v2"></span></p><p>Kibana easily allows to filter for specific services and correlate requests and responses.</p><p
 >This is just a preview of decanter. I will do a more detailed post when the first release is out.</p><br clear="none"><br clear="none"><p><br clear="none"></p></div></div>
            </div>
            <!-- Content -->
          </td>