You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2016/09/04 18:38:26 UTC

[10/36] logging-log4j2 git commit: Update AsyncAppender documentation regarding custom BlockingQueueFactory implementations

Update AsyncAppender documentation regarding custom BlockingQueueFactory implementations


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ebc5e78b
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ebc5e78b
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ebc5e78b

Branch: refs/heads/master
Commit: ebc5e78b923f3661308a6f7b53a62e43a0d1eb95
Parents: 4819624
Author: Matt Sicker <bo...@gmail.com>
Authored: Wed Jun 15 23:00:06 2016 -0500
Committer: Matt Sicker <bo...@gmail.com>
Committed: Wed Jun 15 23:00:06 2016 -0500

----------------------------------------------------------------------
 src/site/xdoc/manual/appenders.xml        | 40 ++++++++++++++++++++++----
 src/site/xdoc/manual/configuration.xml.vm |  6 ++++
 2 files changed, 41 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ebc5e78b/src/site/xdoc/manual/appenders.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/appenders.xml b/src/site/xdoc/manual/appenders.xml
index cf4916f..806e578 100644
--- a/src/site/xdoc/manual/appenders.xml
+++ b/src/site/xdoc/manual/appenders.xml
@@ -65,11 +65,41 @@
             Consider using <a href="async.html">lock-free Async Loggers</a> for optimal performance.
           </p>
           <p>
-            Starting in Log4j 2.7, if the <a href="https://github.com/conversant/disruptor">Conversant Disruptor</a>
-            library is on your classpath, then it will be used instead of <tt>ArrayBlockingQueue</tt>. This provides a
-            performance increase over the old AsyncAppender implementation, but <a href="async.html">async logging</a>
-            still provides higher throughput.
-            <!-- TODO: this needs performance charts added -->
+            Starting in Log4j 2.7, a custom implementation of <tt>BlockingQueue</tt> can be specified by setting the
+            system property <tt>log4j.BlockingQueueFactory</tt> to the fully qualified class name of an implementation of
+            <a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/util/BlockingQueueFactory.html">BlockingQueueFactory</a>.
+            Log4j comes with the following:
+          </p>
+          <table>
+            <caption align="top">BlockingQueueFactory Implementations</caption>
+            <tr>
+              <th>Class Name</th>
+              <th>Description</th>
+            </tr>
+            <tr>
+              <td><tt>org.apache.logging.log4j.core.util.ArrayBlockingQueueFactory</tt></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><tt>org.apache.logging.log4j.core.util.DisruptorBlockingQueueFactory</tt></td>
+              <td>
+                This uses the <a href="https://github.com/conversant/disruptor">Conversant Disruptor</a> implementation
+                of <tt>BlockingQueue</tt>.
+                <!-- TODO: this needs performance charts and links added -->
+              </td>
+            </tr>
+            <tr>
+              <td><tt>org.apache.logging.log4j.core.util.LinkedTransferQueueFactory</tt></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>.
+                <!-- TODO: this needs performance charts and links added -->
+              </td>
+            </tr>
+          </table>
           </p>
           <table>
             <caption align="top">AsyncAppender Parameters</caption>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ebc5e78b/src/site/xdoc/manual/configuration.xml.vm
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/configuration.xml.vm b/src/site/xdoc/manual/configuration.xml.vm
index 1276a0e..d7d281c 100644
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@ -2004,6 +2004,12 @@ public class AwesomeTest {
     <td>Prints a stacktrace to the <a href="#StatusMessages">status logger</a> at DEBUG level
     when the LoggerContext is started. For debug purposes.</td>
   </tr>
+  <tr>
+    <td><a name="log4j.BlockingQueueFactory"/>log4j.BlockingQueueFactory</td>
+    <td>org.apache.logging.log4j.core.util.ArrayBlockingQueueFactory</td>
+    <td>Specifies what type of <tt>BlockingQueue</tt> implementation to use with
+      <a href="appenders.html#AsyncAppender">AsyncAppender</a>.</td>
+  </tr>
 </table>
 
         </subsection>