Details
-
Bug
-
Resolution: Fixed
-
Major
-
0.9.29
-
None
-
MacOsx, Jdk 1.6 update 26
Description
I was trying to use nested markers to organize my logs in a better (maybe) way.
But the MarkerFilter (ch.qos.logback.classic.turbo.MarkerFilter) did not treat nested (or composite) markers as I expect.
Here a test that shows this issue, this test can be appended to ch.qos.logback.classic.turbo.MarkerFilterTest:
@Test
public void testComposite()
The solution that I found is pretty simple, here is the patch:
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/turbo/MarkerFilter.java b/logback-classic/src/main/java/ch/qos/logback/classic/turbo/MarkerFilter.java
index 8e133cb..434b035 100644
— a/logback-classic/src/main/java/ch/qos/logback/classic/turbo/MarkerFilter.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/turbo/MarkerFilter.java
@@ -47,7 +47,7 @@ public class MarkerFilter extends MatchingFilter
- if(markerToMatch.contains(marker)) {
+ if(marker.contains(markerToMatch)) { return onMatch; }else {
return onMismatch;
1.7.5.4