Repository: logging-log4j2 Updated Branches: refs/heads/feature/LOG4J2-1430 3d8f6ec34 -> 349a817e3
Rearrange async appender docs a bit Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/349a817e Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/349a817e Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/349a817e Branch: refs/heads/feature/LOG4J2-1430 Commit: 349a817e381ef85d09a695e6bef00c7bd0c14840 Parents: 3d8f6ec Author: Matt Sicker <boa...@gmail.com> Authored: Sat Jun 18 19:05:51 2016 -0500 Committer: Matt Sicker <boa...@gmail.com> Committed: Sat Jun 18 19:05:51 2016 -0500 ---------------------------------------------------------------------- src/site/xdoc/manual/appenders.xml | 116 ++++++++++++++++---------------- 1 file changed, 58 insertions(+), 58 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/349a817e/src/site/xdoc/manual/appenders.xml ---------------------------------------------------------------------- diff --git a/src/site/xdoc/manual/appenders.xml b/src/site/xdoc/manual/appenders.xml index 4375d5b..70a9d8e 100644 --- a/src/site/xdoc/manual/appenders.xml +++ b/src/site/xdoc/manual/appenders.xml @@ -64,64 +64,6 @@ performance may become worse when more threads are logging concurrently. Consider using <a href="async.html">lock-free Async Loggers</a> for optimal performance. </p> - <p> - Starting in Log4j 2.7, a custom implementation of <tt>BlockingQueue</tt> or <tt>TransferQueue</tt> can be - specified using a - <a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/async/BlockingQueueFactory.html">BlockingQueueFactory</a> - plugin. To override the default <tt>BlockingQueueFactory</tt>, specify the plugin inside an - <code><![CDATA[<Async/>]]></code> element like so: - </p> - <pre class="prettyprint linenums"><![CDATA[ -<Configuration name="LinkedTransferQueueExample"> - <Appenders> - <List name="List"/> - <Async name="Async" bufferSize="262144"> - <AppenderRef ref="List"/> - <LinkedTransferQueue/> - </Async> - </Appenders> - <Loggers> - <Root> - <AppenderRef ref="Async"/> - </Root> - </Loggers> -</Configuration>]]></pre> - <p> - Log4j ships with the following implementations: - </p> - <table> - <caption align="top">BlockingQueueFactory Implementations</caption> - <tr> - <th>Plugin Name</th> - <th>Description</th> - </tr> - <tr> - <td>ArrayBlockingQueue</td> - <td> - This is the default implementation that uses - <a class="javadoc" href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ArrayBlockingQueue.html">ArrayBlockingQueue</a>. - </td> - </tr> - <tr> - <td>DisruptorBlockingQueue</td> - <td> - This uses the <a href="https://github.com/conversant/disruptor">Conversant Disruptor</a> implementation - of <tt>BlockingQueue</tt>. This plugin takes a single optional attribute, <tt>spinPolicy</tt>, which - corresponds to - <!-- TODO: this needs performance charts and links added --> - </td> - </tr> - <tr> - <td>LinkedTransferQueue</td> - <td> - This uses the new in Java 7 implementation - <a class="javadoc" href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/LinkedTransferQueue.html">LinkedTransferQueue</a>. - Note that this queue does not use the <tt>bufferSize</tt> configuration attribute from AsyncAppender as - <tt>LinkedTransferQueue</tt> does not support a maximum capacity. - <!-- TODO: this needs performance charts and links added --> - </td> - </tr> - </table> <table> <caption align="top">AsyncAppender Parameters</caption> <tr> @@ -216,6 +158,64 @@ </Root> </Loggers> </Configuration>]]></pre> + <p> + Starting in Log4j 2.7, a custom implementation of <tt>BlockingQueue</tt> or <tt>TransferQueue</tt> can be + specified using a + <a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/async/BlockingQueueFactory.html">BlockingQueueFactory</a> + plugin. To override the default <tt>BlockingQueueFactory</tt>, specify the plugin inside an + <code><![CDATA[<Async/>]]></code> element like so: + </p> + <pre class="prettyprint linenums"><![CDATA[ +<Configuration name="LinkedTransferQueueExample"> + <Appenders> + <List name="List"/> + <Async name="Async" bufferSize="262144"> + <AppenderRef ref="List"/> + <LinkedTransferQueue/> + </Async> + </Appenders> + <Loggers> + <Root> + <AppenderRef ref="Async"/> + </Root> + </Loggers> +</Configuration>]]></pre> + <p> + Log4j ships with the following implementations: + </p> + <table> + <caption align="top">BlockingQueueFactory Implementations</caption> + <tr> + <th>Plugin Name</th> + <th>Description</th> + </tr> + <tr> + <td>ArrayBlockingQueue</td> + <td> + This is the default implementation that uses + <a class="javadoc" href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ArrayBlockingQueue.html">ArrayBlockingQueue</a>. + </td> + </tr> + <tr> + <td>DisruptorBlockingQueue</td> + <td> + This uses the <a href="https://github.com/conversant/disruptor">Conversant Disruptor</a> implementation + of <tt>BlockingQueue</tt>. This plugin takes a single optional attribute, <tt>spinPolicy</tt>, which + corresponds to + <!-- TODO: this needs performance charts and links added --> + </td> + </tr> + <tr> + <td>LinkedTransferQueue</td> + <td> + This uses the new in Java 7 implementation + <a class="javadoc" href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/LinkedTransferQueue.html">LinkedTransferQueue</a>. + Note that this queue does not use the <tt>bufferSize</tt> configuration attribute from AsyncAppender as + <tt>LinkedTransferQueue</tt> does not support a maximum capacity. + <!-- TODO: this needs performance charts and links added --> + </td> + </tr> + </table> </subsection> <a name="ConsoleAppender"/> <subsection name="ConsoleAppender">