[logback-dev] svn commit: r820 - in logback/trunk/logback-core/src: main/java/ch/qos/logback/core test/java/ch/qos/logback/core/appender

noreply.ceki at qos.ch noreply.ceki at qos.ch
Mon Oct 30 23:15:25 CET 2006


Author: ceki
Date: Mon Oct 30 23:15:25 2006
New Revision: 820

Added:
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/appender/NOPAppender.java
Modified:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Context.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/ContextBase.java

Log:

- Context is no longer FilterAttachable. This change was necessary in order to allow
  LoggerContext to be ClassicFilterAttachable

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Context.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Context.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Context.java	Mon Oct 30 23:15:25 2006
@@ -11,11 +11,10 @@
 
 import java.util.Map;
 
-import ch.qos.logback.core.spi.FilterAttachable;
 import ch.qos.logback.core.status.StatusManager;
 
 
-public interface Context extends FilterAttachable {
+public interface Context {
 
 	
   StatusManager getStatusManager();

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/ContextBase.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/ContextBase.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/ContextBase.java	Mon Oct 30 23:15:25 2006
@@ -12,8 +12,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import ch.qos.logback.core.filter.Filter;
-import ch.qos.logback.core.spi.FilterAttachableImpl;
 import ch.qos.logback.core.status.StatusManager;
 
 public class ContextBase implements Context {
@@ -25,8 +23,7 @@
   // serialized. For the time being, we ignore this shortcoming.
   Map<String, String> propertyMap = new HashMap<String, String>();
   Map<String, Object> objectMap = new HashMap<String, Object>();
-  private FilterAttachableImpl fai = new FilterAttachableImpl();
-
+  
   public StatusManager getStatusManager() {
     return sm;
   }
@@ -51,22 +48,7 @@
     objectMap.put(key, value);
   }
 
-  public void addFilter(Filter newFilter) {
-    fai.addFilter(newFilter);
-  }
-
-  public Filter getFirstFilter() {
-    return fai.getFirstFilter();
-  }
-
-  public void clearAllFilters() {
-    fai.clearAllFilters();
-  }
-
-  public int getFilterChainDecision(Object event) {
-    return fai.getFilterChainDecision(event);
-  }
-
+  
   public String getName() {
     return name;
   }

Added: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/appender/NOPAppender.java
==============================================================================
--- (empty file)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/appender/NOPAppender.java	Mon Oct 30 23:15:25 2006
@@ -0,0 +1,19 @@
+package ch.qos.logback.core.appender;
+
+import ch.qos.logback.core.AppenderBase;
+import ch.qos.logback.core.Layout;
+
+public class NOPAppender extends AppenderBase {
+
+  @Override
+  protected void append(Object eventObject) {
+   }
+
+  public Layout getLayout() {
+    return null;
+  }
+
+  public void setLayout(Layout layout) {
+  }
+
+}



More information about the logback-dev mailing list