[logback-dev] svn commit: r1406 - in logback/trunk/logback-core/src/main/java/ch/qos/logback/core: boolex filter

noreply.seb at qos.ch noreply.seb at qos.ch
Mon Mar 5 17:00:41 CET 2007


Author: seb
Date: Mon Mar  5 17:00:41 2007
New Revision: 1406

Modified:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/boolex/EventEvaluator.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java

Log:
EventEvaluator now extends LifeCycle
Better fail check in EvaluatorFilter

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/boolex/EventEvaluator.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/boolex/EventEvaluator.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/boolex/EventEvaluator.java	Mon Mar  5 17:00:41 2007
@@ -12,6 +12,7 @@
 package ch.qos.logback.core.boolex;
 
 import ch.qos.logback.core.spi.ContextAware;
+import ch.qos.logback.core.spi.LifeCycle;
 
 /**
  * An EventEvaluator has the responsibility to evaluate whether a given an event
@@ -23,7 +24,7 @@
  * @author Ceki Gülcü
  */
 
-public interface EventEvaluator extends ContextAware {
+public interface EventEvaluator extends ContextAware, LifeCycle {
   
 
   /**

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java	Mon Mar  5 17:00:41 2007
@@ -47,7 +47,7 @@
   public FilterReply decide(Object event) {
     // let us not throw an exception
     // see also bug #17.
-    if(!isStarted()) {
+    if(!isStarted() || !evaluator.isStarted()) {
       return FilterReply.NEUTRAL;
     }
     try {



More information about the logback-dev mailing list