[logback-dev] svn commit: r1205 - in logback-demo/src: etc main/resources

noreply.seb at qos.ch noreply.seb at qos.ch
Fri Jan 12 16:39:11 CET 2007


Author: seb
Date: Fri Jan 12 16:39:11 2007
New Revision: 1205

Modified:
   logback-demo/src/etc/logback-access.xml
   logback-demo/src/main/resources/logback.xml

Log:
on going work on the demo documentation

Modified: logback-demo/src/etc/logback-access.xml
==============================================================================
--- logback-demo/src/etc/logback-access.xml	(original)
+++ logback-demo/src/etc/logback-access.xml	Fri Jan 12 16:39:11 2007
@@ -1,8 +1,4 @@
 <configuration>
-
-  <filter class="ch.qos.logback.access.filter.CountingFilter">
-		<name>countingFilter</name>
-	</filter>
  
 	<appender name="STDOUT"
 		class="ch.qos.logback.core.ConsoleAppender">
@@ -10,8 +6,8 @@
 			<Pattern>%h %l %u %t \"%r\" %s %b</Pattern>
 		</layout>
 	</appender>
-
 	
+	<!-- PART VII: Lottery
 	<appender name="SMTP"
 		class="ch.qos.logback.access.net.SMTPAppender">
 		<layout class="ch.qos.logback.access.html.HTMLLayout">
@@ -27,7 +23,40 @@
 	  <To>sebastien at qos.ch</To>
 		<To>ceki.gulcu at gmail.com</To>			
 	</appender>
-
+	
+	<appender name="STDOUT_LOTTERY"
+		class="ch.qos.logback.core.ConsoleAppender">
+		<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+			<evaluator name="lotto_eval">
+				<Expression>
+					url.matches(request.getRequestURL().toString())
+				</Expression>
+				<matcher name="url">
+					<regex>lotto.do</regex>
+					<caseSensitive>false</caseSensitive>
+				</matcher>
+			</evaluator>
+			<OnMatch>ACCEPT</OnMatch>
+			<OnMismatch>DENY</OnMismatch>
+		</filter>
+		<layout class="ch.qos.logback.access.PatternLayout">
+			<Pattern>
+				LOTTO: %A [%r] Guess=%reqParameter{guessed_number}
+			</Pattern>
+		</layout>
+	</appender>	
+	-->
+	
+	<!-- Part VIII: JMX
+  <filter class="ch.qos.logback.access.filter.CountingFilter">
+		<name>countingFilter</name>
+	</filter>	
+	-->
+	
   <appender-ref ref="STDOUT" />
+  
+  <!-- PART VII: Lottery
 	<appender-ref ref="SMTP" />
+	<appender-ref ref="STDOUT_LOTTERY" />
+	-->
 </configuration>
\ No newline at end of file

Modified: logback-demo/src/main/resources/logback.xml
==============================================================================
--- logback-demo/src/main/resources/logback.xml	(original)
+++ logback-demo/src/main/resources/logback.xml	Fri Jan 12 16:39:11 2007
@@ -1,14 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <configuration>
-  
-  <jmxConfigurator />
-  
-  <turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter">
-    <Name>TRACE</Name>
-		<Marker>TRACE</Marker>
-		<OnMatch>DENY</OnMatch>
-	</turboFilter>
 	
 	<appender name="STDOUT"
 		class="ch.qos.logback.core.ConsoleAppender">
@@ -36,6 +28,13 @@
 		</layout>
 	</appender>
 
+	<!-- PART I: Basic Cyclic buffer -->
+	<appender name="CYCLIC"
+		class="ch.qos.logback.core.read.CyclicBufferAppender">
+		<MaxSize>512</MaxSize>
+	</appender>
+
+	<!-- PART II: Cyclic buffer with Evaluator
 	<appender name="CYCLIC"
 		class="ch.qos.logback.core.read.CyclicBufferAppender">
 		<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
@@ -50,11 +49,35 @@
 		</filter>
 		<MaxSize>512</MaxSize>
 	</appender>
-
+	-->
+	
+	<!-- PART III: TurboFilter: MDC value
+  <turboFilter class="ch.qos.logback.classic.turbo.MDCFilter">
+		<MDCKey>username</MDCKey>
+		<Value>sebastien</Value>
+		<OnMatch>ACCEPT</OnMatch>
+	</turboFilter>  
+	-->  
+	
+	<!-- PART V: TurboFilter: Marker value
+  <turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter">
+    <Name>TRACE</Name>
+		<Marker>TRACE</Marker>
+		<OnMatch>DENY</OnMatch>
+	</turboFilter>
+	-->
+	  
+	<!--  
+  <jmxConfigurator />
+  -->
+	
+	
 	<root>
 		<level value="DEBUG" />
 		<appender-ref ref="STDOUT" />
 		<appender-ref ref="FILE" />
+		
+		<!-- Part I: Basic Cyclic buffer -->
    	<appender-ref ref="CYCLIC" />
 	</root>
 



More information about the logback-dev mailing list