You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ch...@apache.org on 2015/11/04 05:24:12 UTC

svn commit: r1712469 - /sling/site/trunk/content/documentation/development/logging.mdtext

Author: chetanm
Date: Wed Nov  4 04:24:11 2015
New Revision: 1712469

URL: http://svn.apache.org/viewvc?rev=1712469&view=rev
Log:
Update for steps on using MDC in log message pattern

Modified:
    sling/site/trunk/content/documentation/development/logging.mdtext

Modified: sling/site/trunk/content/documentation/development/logging.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development/logging.mdtext?rev=1712469&r1=1712468&r2=1712469&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/development/logging.mdtext (original)
+++ sling/site/trunk/content/documentation/development/logging.mdtext Wed Nov  4 04:24:11 2015
@@ -422,6 +422,14 @@ specifying header, cookie, param names.
 
 ![MDC Filter Config](/documentation/bundles/mdc-filter-config.png)
 
+<a name="mdc-pattern">
+### Including MDC in Log Message
+
+To include the MDC value in log message you MUST use the [Logback pattern][15] based on Logback 
+and not the old MessageFormat based pattern. 
+
+    %d{dd.MM.yyyy HH:mm:ss.SSS} *%p* [%X{req.remoteHost}] [%t] %c %msg%n
+
 ### Installation
 
 Download the bundle from [here][12] or use following Maven dependency
@@ -521,4 +529,5 @@ You need to specify the location of logb
 [11]: http://www.slf4j.org/manual.html#mdc
 [12]: http://sling.apache.org/downloads.cgi
 [13]: http://logback.qos.ch/apidocs/ch/qos/logback/classic/spi/ILoggingEvent.html
-[14]: http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/logback-groovy-fragment/
\ No newline at end of file
+[14]: http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/logback-groovy-fragment/
+[15]: http://logback.qos.ch/manual/layouts.html#conversionWord
\ No newline at end of file