logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1380124 - in /logging/log4j/log4j2/trunk: core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java src/changes/changes.xml
Date Mon, 03 Sep 2012 04:10:53 GMT
Author: rgoers
Date: Mon Sep  3 04:10:52 2012
New Revision: 1380124

URL: http://svn.apache.org/viewvc?rev=1380124&view=rev
Log:
Fix for LOG4J2-76 - RewriteAppender should not call the stop method of referenced appenders

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

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java?rev=1380124&r1=1380123&r2=1380124&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java
Mon Sep  3 04:10:52 2012
@@ -46,6 +46,7 @@ public abstract class AbstractManager {
 
     protected AbstractManager(String name) {
         this.name = name;
+        LOGGER.debug("Starting {} {}", this.getClass().getSimpleName(), name);
     }
 
 
@@ -110,6 +111,7 @@ public abstract class AbstractManager {
             --count;
             if (count <= 0) {
                 map.remove(name);
+                LOGGER.debug("Shutting down {} {}", this.getClass().getSimpleName(), getName());
                 releaseSub();
             }
         } finally {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java?rev=1380124&r1=1380123&r2=1380124&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppender.java
Mon Sep  3 04:10:52 2012
@@ -69,9 +69,6 @@ public final class RewriteAppender exten
     @Override
     public void stop() {
         super.stop();
-        for (AppenderControl control : appenders.values()) {
-            control.getAppender().stop();
-        }
     }
 
     /**

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1380124&r1=1380123&r2=1380124&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Mon Sep  3 04:10:52 2012
@@ -23,6 +23,10 @@
 
   <body>
     <release version="2.0-alpha3" date="TBD" description="">
+      <action issue="LOG4J2-76" dev="rgoers" type="fix">
+        RewriteAppender was calling the stop method of the referenced appender causing the
referenced appender's
+        manager to have its use count decremented too many times.
+      </action>
       <action issue="LOG4J2-74" dev="rgoers" type="fix">
         Logger.error(Marker, Message, Throwable) was internally using Level.TRACE.
       </action>



Mime
View raw message