You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2013/10/30 17:40:18 UTC
svn commit: r1537170 -
/logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml
Author: ggregory
Date: Wed Oct 30 16:40:18 2013
New Revision: 1537170
URL: http://svn.apache.org/r1537170
Log:
Add an example for the Composite Triggering Policy.
Modified:
logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml
Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml?rev=1537170&r1=1537169&r2=1537170&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml Wed Oct 30 16:40:18 2013
@@ -2242,6 +2242,16 @@ public class JpaLogEntity extends Abstra
any of the configured policies return true. The <code>CompositeTriggeringPolicy</code> is configured
simply by wrapping other policies in a <code>Policies</code> element.
</p>
+ <p>
+ For example, the following XML fragment defines policies that rollover the log when the JVM starts,
+ when the log size reaches twenty megabytes, and when the current date no longer matches the logâs
+ start date.
+ </p>
+ <pre class="prettyprint linenums"><![CDATA[<Policies>
+ <OnStartupTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="20 MB" />
+ <TimeBasedTriggeringPolicy />
+</Policies>]]></pre>
<h5>OnStartup Triggering Policy</h5>
<p>
The <code>OnStartupTriggeringPolicy</code> policy takes no parameters and causes a rollover if the log