logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1460984 - in /logging/log4j/log4j2/trunk: core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java src/changes/changes.xml
Date Tue, 26 Mar 2013 06:15:02 GMT
Author: rgoers
Date: Tue Mar 26 06:15:02 2013
New Revision: 1460984

URL: http://svn.apache.org/r1460984
Log:
LOG4J2-146 - Avoid IllegalArgumentException in AsynchAppender.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java
    logging/log4j/log4j2/trunk/src/changes/changes.xml

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java?rev=1460984&r1=1460983&r2=1460984&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsynchAppender.java
Tue Mar 26 06:15:02 2013
@@ -226,9 +226,12 @@ public final class AsynchAppender<T exte
             // Process any remaining items in the queue.
             while (!queue.isEmpty()) {
                 try {
-                    final Log4jLogEvent event = Log4jLogEvent.deserialize(queue.take());
-                    for (final AppenderControl control : appenders) {
-                        control.callAppender(event);
+                    Serializable s = queue.take();
+                    if (s instanceof Log4jLogEvent) {
+                        final Log4jLogEvent event = Log4jLogEvent.deserialize(s);
+                        for (final AppenderControl control : appenders) {
+                            control.callAppender(event);
+                        }
                     }
                 } catch (final InterruptedException ex) {
                     // May have been interrupted to shut down.

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1460984&r1=1460983&r2=1460984&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Tue Mar 26 06:15:02 2013
@@ -23,6 +23,9 @@
 
   <body>
     <release version="2.0-beta5" date="@TBD@" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-176" dev="rgoers" type="fix" due-to="Remko Popma">
+        Avoid IllegalArgumentException in AsynchAppender.
+      </action>
       <action issue="LOG4J2-179" dev="ggregory" type="add">
         Add Logger interface APIs to log at given levels.
       </action>



Mime
View raw message