[logback-dev] svn commit: r1678 - in logback/trunk/logback-classic/src: main/java/ch/qos/logback/classic test/java/ch/qos/logback/classic

noreply.ceki at qos.ch noreply.ceki at qos.ch
Sat May 3 19:27:39 CEST 2008


Author: ceki
Date: Sat May  3 19:27:39 2008
New Revision: 1678

Modified:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/TurboFilteringInLoggerTest.java

Log:
- clearing turbofilterChain in LoggerContext after the shutdownAndReset method is called.
 Problem reported by Julia Hu [1].
 
 [1] http://www.qos.ch/pipermail/logback-dev/2008-May/002506.html

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java	Sat May  3 19:27:39 2008
@@ -187,6 +187,7 @@
 
   public void shutdownAndReset() {
     root.recursiveReset();
+    clearAllTurboFilters();
     fireOnReset();
   }
 

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/TurboFilteringInLoggerTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/TurboFilteringInLoggerTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/TurboFilteringInLoggerTest.java	Sat May  3 19:27:39 2008
@@ -131,6 +131,12 @@
     assertFalse(logger.isDebugEnabled(blueMarker));
   }
 
+  public void testLoggingContextShutdownAndReset() {
+    addYesFilter();
+    assertNotNull(context.getFirstTurboFilter());
+    context.shutdownAndReset();
+    assertNull(context.getFirstTurboFilter());
+  }
   
 }
 



More information about the logback-dev mailing list