Author: dpsenner
Date: Wed Jun  5 07:55:46 2013
New Revision: 1489735

URL: http://svn.apache.org/r1489735
Log:
LOG4NET-316 added a configuration example that explains the usage of 
DynamicPatternLayout

Modified:
    logging/log4net/trunk/src/site/xdoc/release/config-examples.xml

Modified: logging/log4net/trunk/src/site/xdoc/release/config-examples.xml
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/site/xdoc/release/config-examples.xml?rev=1489735&r1=1489734&r2=1489735&view=diff
==============================================================================
--- logging/log4net/trunk/src/site/xdoc/release/config-examples.xml (original)
+++ logging/log4net/trunk/src/site/xdoc/release/config-examples.xml Wed Jun  5 
07:55:46 2013
@@ -1082,6 +1082,27 @@ CREATE TABLE Log (
 </appender>
                 ]]></source>
             </section>
+                       
+                       <section id="dynamicpatternlayout" 
name="DynamicPatternLayout">
+                               <p>
+                                       For full details see the SDK Reference 
entry: <a 
href="sdk/log4net.Layout.DynamicPatternLayout.html">log4net.Layout.DynamicPatternLayout</a>.
+                               </p>
+                               <p>
+                                       The <span 
class="code">DynamicPatternLayout</span> should be used whenever the header or 
footer should contain information that could change over time.
+                                       Compared to the static <span 
class="code">PatternLayout</span> which does not re-evaluate on every invoke, 
the <span class="code">DynamicPatternLayout</span>
+                                       does re-evaluate the pattern on every 
invoke. It does, for example, allow to include the current DateTime in the 
header and/or the footer which was not possible
+                                       with the static <span 
class="code">PatternLayout</span>.
+                               </p>
+                               <p>
+                                       The following example shows how to 
configure the <span class="code">DynamicPatternLayout</span>.
+                               </p>
+                               <source language="xml"><![CDATA[
+<layout type="log4net.Layout.DynamicPatternLayout"> 
+  <param name="Header" value="%newline**** Trace Opened Local: 
%date{yyyy-MM-dd HH:mm:ss.fff} UTC: %utcdate{yyyy-MM-dd HH:mm:ss.fff} 
****%newline"/> 
+  <param name="Footer" value="**** Trace Closed %date{yyyy-MM-dd HH:mm:ss.fff} 
****%newline"/> 
+</layout>
+                               ]]></source>
+                       </section>
         </section>
         
     </body>


Reply via email to