LOG4J2-1504 document default value of on-demand RollingFileAppender attribute in Appenders manual page
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d5269df3 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d5269df3 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d5269df3 Branch: refs/heads/LOG4J2-1390 Commit: d5269df3aea20489df4b48e66e31071e126a67dc Parents: a1cd9dd Author: rpopma <[email protected]> Authored: Sun Oct 2 15:24:45 2016 +0900 Committer: rpopma <[email protected]> Committed: Sun Oct 2 15:24:45 2016 +0900 ---------------------------------------------------------------------- src/site/xdoc/manual/appenders.xml | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d5269df3/src/site/xdoc/manual/appenders.xml ---------------------------------------------------------------------- diff --git a/src/site/xdoc/manual/appenders.xml b/src/site/xdoc/manual/appenders.xml index 30eb0dc..54c554c 100644 --- a/src/site/xdoc/manual/appenders.xml +++ b/src/site/xdoc/manual/appenders.xml @@ -429,7 +429,7 @@ <tr> <td>createOnDemand</td> <td>boolean</td> - <td>The appender creates the file on-demand. The appender only creates the file when a log event + <td>The appender creates the file on-demand. The appender only creates the file when a log event passes all filters and is routed to this appender. Defaults to false.</td> </tr> <tr> @@ -1342,7 +1342,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <a name="KafkaAppender"/> <subsection name="KafkaAppender"> <p> - The KafkaAppender logs events to an <a href="https://kafka.apache.org/">Apache Kafka</a> topic. + The KafkaAppender logs events to an <a href="https://kafka.apache.org/">Apache Kafka</a> topic. Each log event is sent as a Kafka record with no key. </p> <table> @@ -2210,8 +2210,8 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <tr> <td>createOnDemand</td> <td>boolean</td> - <td>The appender creates the file on-demand. The appender only creates the file when a log event - passes all filters and is routed to this appender.</td> + <td>The appender creates the file on-demand. The appender only creates the file when a log event + passes all filters and is routed to this appender. Defaults to false.</td> </tr> <tr> <td>filter</td> @@ -3284,8 +3284,8 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { Appenders it references to allow it to shut down properly. </p> <p> - You can also configure a RoutingAppender with scripts: you can run a script when the appender starts - and when a route is chosen for an log event. + You can also configure a RoutingAppender with scripts: you can run a script when the appender starts + and when a route is chosen for an log event. </p> <table> <caption align="top">RoutingAppender Parameters</caption> @@ -3320,7 +3320,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <td>Script</td> <td> <p> - This Script runs when Log4j starts the RoutingAppender and returns a String Route key to + This Script runs when Log4j starts the RoutingAppender and returns a String Route key to determine the default Route. </p> <p> @@ -3343,7 +3343,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <td>Map</td> <td> A Map shared between all script invocations for this appender instance. This is - the same map passed to the Routes Script. + the same map passed to the Routes Script. </td> </tr> </table> @@ -3359,9 +3359,9 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { </tr> </table> <p> - In this example, the script causes the "ServiceWindows" route to be the default route on Windows and - "ServiceOther" on all other operating systems. Note that the List Appender is one of our test appenders, - any appender can be used, it is only used as a shorthand. + In this example, the script causes the "ServiceWindows" route to be the default route on Windows and + "ServiceOther" on all other operating systems. Note that the List Appender is one of our test appenders, + any appender can be used, it is only used as a shorthand. </p> <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> <Configuration status="WARN" name="RoutingTest"> @@ -3428,7 +3428,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <td>Map</td> <td> A Map shared between all script invocations for this appender instance. This is - the same map passed to the Routes Script. + the same map passed to the Routes Script. </td> </tr> <tr> @@ -3438,7 +3438,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { </tr> </table> <p> - In this example, the script runs for each log event and picks a route based on the presence of a + In this example, the script runs for each log event and picks a route based on the presence of a Marker named "AUDIT". </p> <pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> @@ -3449,20 +3449,20 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <Agent host="192.168.10.101" port="8800"/> <Agent host="192.168.10.102" port="8800"/> <RFC5424Layout enterpriseNumber="18060" includeMDC="true" appName="MyApp"/> - </Flume> + </Flume> <Routing name="Routing"> <Routes> <Script name="RoutingInit" language="JavaScript"><![CDATA[ if (logEvent.getMarker() != null && logEvent.getMarker().isInstanceOf("AUDIT")) { return "AUDIT"; - } else if (logEvent.getContextMap().containsKey("UserId")) { + } else if (logEvent.getContextMap().containsKey("UserId")) { return logEvent.getContextMap().get("UserId"); } return "STDOUT";]]]]><![CDATA[> </Script> <Route> - <RollingFile - name="Rolling-${mdc:UserId}" + <RollingFile + name="Rolling-${mdc:UserId}" fileName="${mdc:UserId}.log" filePattern="${mdc:UserId}.%i.log.gz"> <PatternLayout> @@ -3474,7 +3474,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <Route ref="AuditLogger" key="AUDIT"/> <Route ref="STDOUT" key="STDOUT"/> </Routes> - <IdlePurgePolicy timeToLive="15" timeUnit="minutes"/> + <IdlePurgePolicy timeToLive="15" timeUnit="minutes"/> </Routing> </Appenders> <Loggers> @@ -3483,7 +3483,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { </Root> </Loggers> </Configuration> -]]></pre> +]]></pre> <h4>Purge Policy</h4> <p>The RoutingAppender can be configured with a PurgePolicy whose purpose is to stop and remove dormant Appenders that have been dynamically created by the RoutingAppender. Log4j currently provides the @@ -3660,15 +3660,15 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <a name="ScriptAppenderSelector"/> <subsection name="ScriptAppenderSelector"> <p> - When the configuration is built, the <code>ScriptAppenderSelector</code> appender calls a <code>Script</code> - to compute an appender name. Log4j then creates one of the appender named listed under - <code>AppenderSet</code> using the name of the <code>ScriptAppenderSelector</code>. After configuration, Log4j - ignores the <code>ScriptAppenderSelector</code>. Log4j only builds the one selected appender from the - configuration tree, and ignores other <code>AppenderSet</code> child nodes. + When the configuration is built, the <code>ScriptAppenderSelector</code> appender calls a <code>Script</code> + to compute an appender name. Log4j then creates one of the appender named listed under + <code>AppenderSet</code> using the name of the <code>ScriptAppenderSelector</code>. After configuration, Log4j + ignores the <code>ScriptAppenderSelector</code>. Log4j only builds the one selected appender from the + configuration tree, and ignores other <code>AppenderSet</code> child nodes. </p> <p> - In the following example, the script returns the name "List2". The appender name is recorded under - the name of the <code>ScriptAppenderSelector</code>, not the name of the selected appender, in this example, + In the following example, the script returns the name "List2". The appender name is recorded under + the name of the <code>ScriptAppenderSelector</code>, not the name of the selected appender, in this example, "SelectIt". </p> <pre class="prettyprint linenums"><![CDATA[<Configuration status="WARN" name="ScriptAppenderSelectorExample"> @@ -3689,7 +3689,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <AppenderRef ref="SelectIt" /> </Root> </Loggers> -</Configuration>]]></pre> +</Configuration>]]></pre> </subsection> <a name="SocketAppender"/> <subsection name="SocketAppender">
