[logback-dev] svn commit: r781 - in logback/trunk/logback-classic: . examples/src/chapter5

noreply.ceki at qos.ch noreply.ceki at qos.ch
Wed Oct 25 23:39:51 CEST 2006


Author: ceki
Date: Wed Oct 25 23:39:51 2006
New Revision: 781

Modified:
   logback/trunk/logback-classic/examples/src/chapter5/GoMDC.java
   logback/trunk/logback-classic/mdcfilter.xml

Log:
seems to work ok

Modified: logback/trunk/logback-classic/examples/src/chapter5/GoMDC.java
==============================================================================
--- logback/trunk/logback-classic/examples/src/chapter5/GoMDC.java	(original)
+++ logback/trunk/logback-classic/examples/src/chapter5/GoMDC.java	Wed Oct 25 23:39:51 2006
@@ -26,7 +26,7 @@
     }
 
     logger.debug("I know me " + 0);
-    MDC.put("k", "v");
+    MDC.put("key", "val");
     logger.debug("I know me " + 1);
     
     StatusPrinter.print(lc);

Modified: logback/trunk/logback-classic/mdcfilter.xml
==============================================================================
--- logback/trunk/logback-classic/mdcfilter.xml	(original)
+++ logback/trunk/logback-classic/mdcfilter.xml	Wed Oct 25 23:39:51 2006
@@ -11,13 +11,14 @@
       <x>DENY</x>
       <Evaluator class="ch.qos.logback.classic.boolex.JaninoEventEvaluator">
         <Name>mdcEvaluator</Name>
-        <Expression>mdc!=null &amp;&amp; mdc.get("key").equals("val")</Expression>
+        <Expression>mdc!=null &amp;&amp; "val".equals(mdc.get("key"))</Expression>
       </Evaluator>
      
     </filter>
   </appender>
 
 <!-- <Expression>"v".equals(mdc.get("k"))</Expression>
+ <Expression>mdc!=null &amp;&amp; mdc.get("key").equals("val")</Expression>
 -->
 
   <root>



More information about the logback-dev mailing list