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

noreply.ceki at qos.ch noreply.ceki at qos.ch
Wed Nov 29 21:15:46 CET 2006


Author: ceki
Date: Wed Nov 29 21:15:45 2006
New Revision: 1039

Modified:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/turbo/MarkerFilter.java
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/turbo/MarkerFilterTest.java

Log:

- The setMarker now takes a string instead of Marker.

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/turbo/MarkerFilter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/turbo/MarkerFilter.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/turbo/MarkerFilter.java	Wed Nov 29 21:15:45 2006
@@ -1,6 +1,7 @@
 package ch.qos.logback.classic.turbo;
 
 import org.slf4j.Marker;
+import org.slf4j.MarkerFactory;
 
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.Logger;
@@ -44,7 +45,9 @@
    * 
    * @param marker2Match
    */
-  public void setMarker(Marker marker2Match) {
-    this.marker2Match = marker2Match;
+  public void setMarker(String markerStr) {
+    if(markerStr != null) {
+      this.marker2Match = MarkerFactory.getMarker(markerStr);
+    }
   }
 }

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/turbo/MarkerFilterTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/turbo/MarkerFilterTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/turbo/MarkerFilterTest.java	Wed Nov 29 21:15:45 2006
@@ -36,7 +36,7 @@
   
   public void testBasic() {
     MarkerFilter mkt = new MarkerFilter();
-    mkt.setMarker(totoMarker);
+    mkt.setMarker(MARKER_NAME);
     mkt.setOnMatch("ACCEPT");
     mkt.setOnMismatch("DENY");
 



More information about the logback-dev mailing list