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 2018/05/04 17:49:11 UTC

logging-log4j2 git commit: [LOG4J2-2334]Add API org.apache.logging.log4j.core.appender.AsyncAppender.getQueueSize().

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 9d57fe27b -> 6977c0a57


[LOG4J2-2334]Add API
org.apache.logging.log4j.core.appender.AsyncAppender.getQueueSize().

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

Branch: refs/heads/master
Commit: 6977c0a570e9d8f62c73fcf998eac70783178a87
Parents: 9d57fe2
Author: Gary Gregory <ga...@gmail.com>
Authored: Fri May 4 11:49:01 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Fri May 4 11:49:01 2018 -0600

----------------------------------------------------------------------
 .../apache/logging/log4j/core/appender/AsyncAppender.java | 10 ++++++++++
 src/changes/changes.xml                                   |  6 ++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6977c0a5/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
index ba51f49..b0ed1d9 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
@@ -524,4 +524,14 @@ public final class AsyncAppender extends AbstractAppender {
     public int getQueueRemainingCapacity() {
         return queue.remainingCapacity();
     }
+
+    /**
+     * Returns the number of elements in the queue.
+     * 
+     * @return the number of elements in the queue. 
+     * @since 2.11.1
+     */
+    public int getQueueSize() {
+        return queue.size();
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6977c0a5/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 687cb50..77537c6 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -171,6 +171,9 @@
       <action issue="LOG4J2-2333" dev="ckozak" type="fix">
         Handle errors thrown in default disruptor ExceptionHandler implementations to avoid killing background threads.
       </action>
+      <action issue="LOG4J2-2334" dev="ggregory" type="fix">
+        Add API org.apache.logging.log4j.core.appender.AsyncAppender.getQueueSize().
+      </action>
     </release>
     <release version="2.11.1" date="2018-MM-DD" description="GA Release 2.11.1">
       <action issue="LOG4J2-2268" dev="rgoers" type="fix" due-to="Tilman Hausherr">
@@ -235,6 +238,9 @@
       <action issue="LOG4J2-2333" dev="ckozak" type="fix">
         Handle errors thrown in default disruptor ExceptionHandler implementations to avoid killing background threads.
       </action>
+      <action issue="LOG4J2-2334" dev="ggregory" type="fix">
+        Add API org.apache.logging.log4j.core.appender.AsyncAppender.getQueueSize().
+      </action>
     </release>
     <release version="2.11.0" date="2018-xx-xx" description="GA Release 2.11.0">
       <action issue="LOG4J2-2104" dev="rgoers" type="fix">