Author: buildbot Date: Wed Nov 4 04:24:27 2015 New Revision: 971282 Log: Staging update by buildbot for sling
Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/documentation/development/logging.html Propchange: websites/staging/sling/trunk/content/ ------------------------------------------------------------------------------ --- cms:source-revision (original) +++ cms:source-revision Wed Nov 4 04:24:27 2015 @@ -1 +1 @@ -1712288 +1712469 Modified: websites/staging/sling/trunk/content/documentation/development/logging.html ============================================================================== --- websites/staging/sling/trunk/content/documentation/development/logging.html (original) +++ websites/staging/sling/trunk/content/documentation/development/logging.html Wed Nov 4 04:24:27 2015 @@ -153,6 +153,7 @@ This document is for the new (November 2 <li><a href="#using-slf4j-api-17">Using Slf4j API 1.7</a></li> <li><a href="#log-tracer">Log Tracer</a></li> <li><a href="#slf4j-mdc">Slf4j MDC</a><ul> +<li><a href="#including-mdc-in-log-message">Including MDC in Log Message</a></li> <li><a href="#installation">Installation</a></li> </ul> </li> @@ -658,6 +659,14 @@ as part of HTTP request around how the l Look for configuration with name 'Apache Sling Logging MDC Inserting Filter' for details on specifying header, cookie, param names.</p> <p><img alt="MDC Filter Config" src="/documentation/bundles/mdc-filter-config.png" /></p> +<p><a name="mdc-pattern"></p> +<h3 id="including-mdc-in-log-message">Including MDC in Log Message<a class="headerlink" href="#including-mdc-in-log-message" title="Permanent link">¶</a></h3> +<p>To include the MDC value in log message you MUST use the <a href="http://logback.qos.ch/manual/layouts.html#conversionWord">Logback pattern</a> based on Logback +and not the old MessageFormat based pattern. </p> +<div class="codehilite"><pre><span class="c">%d{dd.MM.yyyy HH:mm:ss.SSS} *%p* [%X{req.remoteHost}] [%t] %c %msg%n</span> +</pre></div> + + <h3 id="installation">Installation<a class="headerlink" href="#installation" title="Permanent link">¶</a></h3> <p>Download the bundle from <a href="http://sling.apache.org/downloads.cgi">here</a> or use following Maven dependency</p> <div class="codehilite"><pre><span class="nt"><dependency></span> @@ -738,7 +747,7 @@ To get complete log support working you <div class="codehilite"><pre> <span class="n">java</span> <span class="o">-</span><span class="n">jar</span> <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">sling</span><span class="p">.</span><span class="n">launchpad</span><span class="o">-</span><span class="n">XXX</span><span class="o">-</span><span class="n">standalone</span><span class="p">.</span><span class="n">jar</span> <span class="o">-</span><span class="n">Dorg</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">sling</span><span class="p">.</span><span class="n">commons</span><span class="p">.</span><span class="nb">log</span><span class="p">.</span><span class="n">configurationFile</span><span class="p">=</span><span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">logback</span> </pre></div> <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;"> - Rev. 1692853 by chetanm on Mon, 27 Jul 2015 10:08:25 +0000 + Rev. 1712469 by chetanm on Wed, 4 Nov 2015 04:24:11 +0000 </div> <div class="trademarkFooter"> Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project