[logback-dev] svn commit: r1259 - in logback-demo/trunk/src: etc main/resources
noreply.seb at qos.ch
noreply.seb at qos.ch
Mon Jan 22 14:57:19 CET 2007
Author: seb
Date: Mon Jan 22 14:57:19 2007
New Revision: 1259
Modified:
logback-demo/trunk/src/etc/logback-access.xml
logback-demo/trunk/src/main/resources/logback.xml
Log:
start state for the demo
Modified: logback-demo/trunk/src/etc/logback-access.xml
==============================================================================
--- logback-demo/trunk/src/etc/logback-access.xml (original)
+++ logback-demo/trunk/src/etc/logback-access.xml Mon Jan 22 14:57:19 2007
@@ -7,13 +7,13 @@
</layout>
</appender>
- <!-- PART VII: Lottery -->
+ <!-- PART VII: Lottery to Console
<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())
+ url.matches(event.getRequestURL().toString())
</Expression>
<matcher name="url">
<regex>Lottery.do</regex>
@@ -25,13 +25,13 @@
</filter>
<layout class="ch.qos.logback.access.PatternLayout">
<Pattern>
- LOTTO: %A [%r] Guess=%reqParameter{guessed_number}
+ LOTTERY: %A [%r] Guess=%reqParameter{guessed_number}
</Pattern>
</layout>
</appender>
-
+ -->
- <!--
+ <!-- PART VIII: Lottery to Email
<appender name="SMTP"
class="ch.qos.logback.access.net.SMTPAppender">
<layout class="ch.qos.logback.access.html.HTMLLayout">
@@ -41,11 +41,11 @@
<Evaluator class="ch.qos.logback.access.net.URLEvaluator">
<URL>winner.jsp</URL>
</Evaluator>
- <From>ceki at qos.ch</From>
- <SMTPHost>gmail-smtp-in.l.google.com</SMTPHost>
- <Subject>Winner detected</Subject>
- <To>sebastien at qos.ch</To>
- <To>ceki.gulcu at gmail.com</To>
+ <From>choose.a.sender.email at yourOrg.com</From>
+ <SMTPHost>your.smtp.host</SMTPHost>
+ <Subject>Winner detected</Subject>
+ <To>your.email at yourOrg.com</To>
+ <To>another.email at yourOrg.com</To>
</appender>
-->
@@ -58,9 +58,12 @@
<appender-ref ref="STDOUT" />
- <!-- PART VII: Lottery -->
+ <!-- PART VII: Lottery to Console
<appender-ref ref="STDOUT_LOTTERY" />
-
+ -->
+
+ <!-- PART VII: Lottery to Email
+ <appender-ref ref="SMTP" />
+ -->
- <!-- <appender-ref ref="SMTP" /> -->
</configuration>
\ No newline at end of file
Modified: logback-demo/trunk/src/main/resources/logback.xml
==============================================================================
--- logback-demo/trunk/src/main/resources/logback.xml (original)
+++ logback-demo/trunk/src/main/resources/logback.xml Mon Jan 22 14:57:19 2007
@@ -2,6 +2,10 @@
<configuration>
+ <!--
+ Starting configuration:
+ Logback logs to the console and to a file.
+ -->
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
@@ -10,7 +14,7 @@
</pattern>
</layout>
</appender>
-
+
<appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>logFile.log</File>
@@ -35,13 +39,13 @@
</appender>
-->
- <!-- PART II: Cyclic buffer with Evaluator -->
+ <!-- PART II: Cyclic buffer with Evaluator
<appender name="CYCLIC"
class="ch.qos.logback.core.read.CyclicBufferAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator name="loggingTaskEval">
<expression>
- logger.getName().contns("LoggingTask") &&
+ logger.getName().contains("LoggingTask") &&
message.contains("Howdydy-diddly-ho") &&
(timeStamp - event.getStartTime()) >= 20000
</expression>
@@ -50,14 +54,15 @@
</filter>
<MaxSize>512</MaxSize>
</appender>
-
- <!-- PART III: TurboFilter: MDC value
+ -->
+
+ <!-- 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">
@@ -67,18 +72,22 @@
</turboFilter>
-->
- <!--
+ <!-- PART VIII: JMX Configurator
<jmxConfigurator />
-->
-
+
<root>
<level value="DEBUG" />
+
<appender-ref ref="STDOUT" />
- <appender-ref ref="FILE" />
- <!-- Part I: Basic Cyclic buffer -->
+ <appender-ref ref="FILE" />
+
+ <!-- Part I: Basic Cyclic buffer
<appender-ref ref="CYCLIC" />
+ -->
+
</root>
</configuration>
More information about the logback-dev
mailing list