[logback-dev] svn commit: r842 - in logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic: . spi

noreply.ceki at qos.ch noreply.ceki at qos.ch
Tue Oct 31 22:53:07 CET 2006


Author: ceki
Date: Tue Oct 31 22:53:07 2006
New Revision: 842

Added:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/TurboFilterAttachable.java
      - copied, changed from r841, /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ClassicFilterAttachable.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/TurboFilterAttachableImpl.java
      - copied, changed from r841, /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ClassicFilterAttachableImpl.java
Removed:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ClassicFilterAttachable.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ClassicFilterAttachableImpl.java
Modified:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/Logger.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java

Log:

aligning method with the new name, i.e. TurboFilter

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/Logger.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/Logger.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/Logger.java	Tue Oct 31 22:53:07 2006
@@ -407,7 +407,7 @@
   final void filterAndLog(final Marker marker, final Level level, final String msg, final Object[] params,
       final Throwable t) {
   
-    final int decision = loggerContext.getFilterChainDecision(marker, this, Level.DEBUG, msg, params, t);
+    final int decision = loggerContext.getTurboFilterChainDecision(marker, this, Level.DEBUG, msg, params, t);
     
     if(decision == Filter.NEUTRAL) {
       if(effectiveLevelInt > level.levelInt) {

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	Tue Oct 31 22:53:07 2006
@@ -17,8 +17,8 @@
 import org.slf4j.Marker;
 
 import ch.qos.logback.classic.turbo.TurboFilter;
-import ch.qos.logback.classic.spi.ClassicFilterAttachable;
-import ch.qos.logback.classic.spi.ClassicFilterAttachableImpl;
+import ch.qos.logback.classic.spi.TurboFilterAttachable;
+import ch.qos.logback.classic.spi.TurboFilterAttachableImpl;
 import ch.qos.logback.classic.spi.LoggerContextRemoteView;
 import ch.qos.logback.core.ContextBase;
 import ch.qos.logback.core.CoreGlobal;
@@ -29,7 +29,7 @@
  * @author ceki
  */
 public class LoggerContext extends ContextBase implements ILoggerFactory,
-    ClassicFilterAttachable {
+    TurboFilterAttachable {
 
   public static final String ROOT_NAME = "root";
 
@@ -46,7 +46,7 @@
 
   LoggerContextRemoteView loggerContextRemoteView;
 
-  ClassicFilterAttachableImpl cfai = null;
+  TurboFilterAttachableImpl cfai = null;
 
   public LoggerContext() {
     super();
@@ -169,35 +169,35 @@
 
   }
 
-  public void addFilter(TurboFilter newFilter) {
+  public void addTurboFilter(TurboFilter newFilter) {
     if (cfai == null) {
-      cfai = new ClassicFilterAttachableImpl();
+      cfai = new TurboFilterAttachableImpl();
     }
-    cfai.addFilter(newFilter);
+    cfai.addTurboFilter(newFilter);
   }
 
-  public void clearAllFilters() {
+  public void clearAllTurboFilters() {
     if (cfai == null) {
       return;
     }
-    cfai.clearAllFilters();
+    cfai.clearAllTurboFilters();
     cfai = null;
   }
 
-  final public int getFilterChainDecision(final Marker marker,
+  final public int getTurboFilterChainDecision(final Marker marker,
       final Logger logger, final Level level, final String format, final Object[] params,
       final Throwable t) {
     if (cfai == null) {
       return Filter.NEUTRAL;
     }
     return cfai
-        .getFilterChainDecision(marker, logger, level, format, params, t);
+        .getTurboFilterChainDecision(marker, logger, level, format, params, t);
   }
 
-  public TurboFilter getFirstFilter() {
+  public TurboFilter getFirstTurboFilter() {
     if (cfai == null) {
       return null;
     }
-    return cfai.getFirstFilter();
+    return cfai.getFirstTurboFilter();
   }
 }

Copied: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/TurboFilterAttachable.java (from r841, /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ClassicFilterAttachable.java)
==============================================================================
--- /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ClassicFilterAttachable.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/TurboFilterAttachable.java	Tue Oct 31 22:53:07 2006
@@ -11,26 +11,26 @@
  * 
  * @author Ceki Gülcü
  */
-public interface ClassicFilterAttachable {
+public interface TurboFilterAttachable {
 
   /**
    * Add a filter.
    */
-  public void addFilter(TurboFilter newFilter);
+  public void addTurboFilter(TurboFilter newFilter);
 
   /**
    * Get first filter in the chain.
    */
-  public TurboFilter getFirstFilter();
+  public TurboFilter getFirstTurboFilter();
 
-  public void clearAllFilters();
+  public void clearAllTurboFilters();
 
   /**
    * Loop through the filters in the chain. As soon as a filter decides on
    * ACCEPT or DENY, then that value is returned. If all of the filters return
    * NEUTRAL, then NEUTRAL is returned.
    */
-  public int getFilterChainDecision(Marker marker, Logger logger,
+  public int getTurboFilterChainDecision(Marker marker, Logger logger,
       Level level, String format, Object[] params, Throwable t);
 
 }

Copied: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/TurboFilterAttachableImpl.java (from r841, /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ClassicFilterAttachableImpl.java)
==============================================================================
--- /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/ClassicFilterAttachableImpl.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/TurboFilterAttachableImpl.java	Tue Oct 31 22:53:07 2006
@@ -21,7 +21,7 @@
  * 
  * @author Ceki Gülcü
  */
-final public class ClassicFilterAttachableImpl implements ClassicFilterAttachable {
+final public class TurboFilterAttachableImpl implements TurboFilterAttachable {
 
   TurboFilter headFilter;
   TurboFilter tailFilter;
@@ -29,7 +29,7 @@
   /**
    * Add a filter to end of the filter list.
    */
-  public void addFilter(TurboFilter newFilter) {
+  public void addTurboFilter(TurboFilter newFilter) {
     if (headFilter == null) {
       headFilter = newFilter;
       tailFilter = newFilter;
@@ -42,14 +42,14 @@
   /**
    * Get first filter in the chain.
    */
-  public TurboFilter getFirstFilter() {
+  public TurboFilter getFirstTurboFilter() {
     return headFilter;
   }
 
   /**
    * Clear the filter chain
    */
-  public void clearAllFilters() {
+  public void clearAllTurboFilters() {
     TurboFilter f = headFilter;
     while (f != null) {
       final TurboFilter next = f.getNext();
@@ -66,7 +66,7 @@
    * ACCEPT or DENY, then that value is returned. If all of the filters return
    * NEUTRAL, then  NEUTRAL is returned.
    */
-  public final int getFilterChainDecision(final Marker marker, final Logger logger,
+  public final int getTurboFilterChainDecision(final Marker marker, final Logger logger,
       final Level level, final String format, final Object[] params, final Throwable t) {
     TurboFilter f = headFilter;
 



More information about the logback-dev mailing list