[logback-dev] svn commit: r2129 - in logback/trunk: logback-examples/src/main/java/chapter2 logback-examples/src/main/java/chapter3 logback-examples/src/main/java/chapter4 logback-examples/src/main/java/chapter4/conf logback-examples/src/main/java/chapter4/db logback-examples/src/main/java/chapter4/mail logback-examples/src/main/java/chapter6 logback-examples/src/main/java/chapter7 logback-site/src/site/pages logback-site/src/site/pages/manual
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Wed Jan 21 22:57:21 CET 2009
Author: ceki
Date: Wed Jan 21 22:57:21 2009
New Revision: 2129
Modified:
logback/trunk/logback-examples/src/main/java/chapter2/sample-config-1.xml
logback/trunk/logback-examples/src/main/java/chapter2/sample-config-2.xml
logback/trunk/logback-examples/src/main/java/chapter2/sample-config-3.xml
logback/trunk/logback-examples/src/main/java/chapter3/additivityFlag.xml
logback/trunk/logback-examples/src/main/java/chapter3/duplicate.xml
logback/trunk/logback-examples/src/main/java/chapter3/restricted.xml
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-HtmlToConsole.xml
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-MDC.xml
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTP.xml
logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTPWithHtml.xml
logback/trunk/logback-examples/src/main/java/chapter4/countingConsole.xml
logback/trunk/logback-examples/src/main/java/chapter4/db/append-toMySQL-with-datasource.xml
logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-drivermanager.xml
logback/trunk/logback-examples/src/main/java/chapter4/mail/mail2.xml
logback/trunk/logback-examples/src/main/java/chapter6/FilterEvents.java
logback/trunk/logback-examples/src/main/java/chapter6/basicEventEvaluator.xml
logback/trunk/logback-examples/src/main/java/chapter7/simpleMDC.xml
logback/trunk/logback-site/src/site/pages/manual/filters.html
logback/trunk/logback-site/src/site/pages/manual/jmxConfig.html
logback/trunk/logback-site/src/site/pages/manual/joran.html
logback/trunk/logback-site/src/site/pages/manual/layouts.html
logback/trunk/logback-site/src/site/pages/manual/mdc.html
logback/trunk/logback-site/src/site/pages/news.html
Log:
Adjusting all examples so that the level of a logger or root logger is declared
as an attribute and not as a nested element. However, the code still honors the old covention.
Modified: logback/trunk/logback-examples/src/main/java/chapter2/sample-config-1.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter2/sample-config-1.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter2/sample-config-1.xml Wed Jan 21 22:57:21 2009
@@ -9,8 +9,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter2/sample-config-2.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter2/sample-config-2.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter2/sample-config-2.xml Wed Jan 21 22:57:21 2009
@@ -17,8 +17,7 @@
<File>sample-log.txt</File>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
Modified: logback/trunk/logback-examples/src/main/java/chapter2/sample-config-3.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter2/sample-config-3.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter2/sample-config-3.xml Wed Jan 21 22:57:21 2009
@@ -17,12 +17,9 @@
<File>sample-log.txt</File>
</appender>
- <logger name="chapter2">
- <level value="info" />
- </logger>
+ <logger name="chapter2" level="info" />
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
Modified: logback/trunk/logback-examples/src/main/java/chapter3/additivityFlag.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter3/additivityFlag.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter3/additivityFlag.xml Wed Jan 21 22:57:21 2009
@@ -19,8 +19,7 @@
<appender-ref ref="FILE" />
</logger>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
Modified: logback/trunk/logback-examples/src/main/java/chapter3/duplicate.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter3/duplicate.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter3/duplicate.xml Wed Jan 21 22:57:21 2009
@@ -13,8 +13,7 @@
<appender-ref ref="STDOUT" />
</logger>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
Modified: logback/trunk/logback-examples/src/main/java/chapter3/restricted.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter3/restricted.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter3/restricted.xml Wed Jan 21 22:57:21 2009
@@ -17,8 +17,7 @@
<appender-ref ref="FILE" />
</logger>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-HtmlToConsole.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-HtmlToConsole.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-HtmlToConsole.xml Wed Jan 21 22:57:21 2009
@@ -10,8 +10,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-MDC.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-MDC.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-MDC.xml Wed Jan 21 22:57:21 2009
@@ -7,8 +7,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTP.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTP.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTP.xml Wed Jan 21 22:57:21 2009
@@ -13,8 +13,7 @@
<To>recipient_email at host.ch</To>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="SMTP" />
</root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTPWithHtml.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTPWithHtml.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/logback-SMTPWithHtml.xml Wed Jan 21 22:57:21 2009
@@ -14,8 +14,7 @@
<To>recipient_email at host.ch</To>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="SMTP" />
</root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/countingConsole.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/countingConsole.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/countingConsole.xml Wed Jan 21 22:57:21 2009
@@ -10,8 +10,7 @@
<limit>5</limit>
</appender>
- <root>
- <level value="debug"/>
+ <root level="debug">
<appender-ref ref="CUSTOM" />
</root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-toMySQL-with-datasource.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-toMySQL-with-datasource.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-toMySQL-with-datasource.xml Wed Jan 21 22:57:21 2009
@@ -14,8 +14,7 @@
</connectionSource>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="DB" />
</root>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-drivermanager.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-drivermanager.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/db/append-with-drivermanager.xml Wed Jan 21 22:57:21 2009
@@ -12,8 +12,7 @@
</connectionSource>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="DB" />
</root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter4/mail/mail2.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/mail/mail2.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/mail/mail2.xml Wed Jan 21 22:57:21 2009
@@ -9,8 +9,7 @@
<layout class="ch.qos.logback.classic.html.HTMLLayout"/>
</appender>
- <root>
- <level value="debug"/>
+ <root level="debug">
<appender-ref ref="EMAIL" />
</root>
</configuration>
Modified: logback/trunk/logback-examples/src/main/java/chapter6/FilterEvents.java
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter6/FilterEvents.java (original)
+++ logback/trunk/logback-examples/src/main/java/chapter6/FilterEvents.java Wed Jan 21 22:57:21 2009
@@ -1,3 +1,12 @@
+/**
+ * Logback: the generic, reliable, fast and flexible logging framework.
+ *
+ * Copyright (C) 2000-2009, QOS.ch
+ *
+ * This library is free software, you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation.
+ */
package chapter6;
import org.slf4j.Logger;
Modified: logback/trunk/logback-examples/src/main/java/chapter6/basicEventEvaluator.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter6/basicEventEvaluator.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter6/basicEventEvaluator.xml Wed Jan 21 22:57:21 2009
@@ -8,7 +8,7 @@
<OnMismatch>NEUTRAL</OnMismatch>
<OnMatch>DENY</OnMatch>
</filter>
- <layout class="ch.qos.logback.classic.PatternLayout">
+ <layout>
<pattern>%-4relative [%thread] %-5level %logger - %msg%n</pattern>
</layout>
</appender>
Modified: logback/trunk/logback-examples/src/main/java/chapter7/simpleMDC.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter7/simpleMDC.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter7/simpleMDC.xml Wed Jan 21 22:57:21 2009
@@ -9,8 +9,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="CONSOLE" />
</root>
</configuration>
Modified: logback/trunk/logback-site/src/site/pages/manual/filters.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/filters.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/filters.html Wed Jan 21 22:57:21 2009
@@ -188,7 +188,7 @@
configuration that uses <code>LevelFilter</code>.
</p>
-<em>Example 6.3: Sample LevelFilter configuration (logback-examples/src/main/java/chapter6/LevelFilterConfig.xml)</em>
+<em>Example 6.3: Sample LevelFilter configuration (logback-examples/src/main/java/chapter6/levelFilterConfig.xml)</em>
<div class="source"><pre><configuration>
<appender name="CONSOLE"
class="ch.qos.logback.core.ConsoleAppender">
@@ -203,8 +203,7 @@
</pattern>
</layout>
</appender>
- <root>
- <level value="DEBUG" />
+ <root level="DEBUG">
<appender-ref ref="CONSOLE" />
</root>
</configuration></pre></div>
@@ -218,7 +217,7 @@
use of the <code>ThresholdFilter</code> is shown below.
</p>
-<em>Example 6.4: Sample ThresholdFilter configuration (logback-examples/src/main/java/chapter6/ThresholdFilterConfig.xml)</em>
+<em>Example 6.4: Sample ThresholdFilter configuration (logback-examples/src/main/java/chapter6/thresholdFilterConfig.xml)</em>
<div class="source"><pre><configuration>
<appender name="CONSOLE"
class="ch.qos.logback.core.ConsoleAppender">
@@ -231,8 +230,7 @@
</pattern>
</layout>
</appender>
- <root>
- <level value="DEBUG" />
+ <root level="DEBUG">
<appender-ref ref="CONSOLE" />
</root>
</configuration></pre></div>
@@ -361,15 +359,14 @@
<OnMismatch>NEUTRAL</OnMismatch>
<OnMatch>DENY</OnMatch>
</filter></b>
- <layout class="ch.qos.logback.classic.PatternLayout">
+ <layout>
<pattern>
%-4relative [%thread] %-5level %logger - %msg%n
</pattern>
</layout>
</appender>
- <root>
- <level value="INFO" />
+ <root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration></pre></div>
@@ -594,8 +591,7 @@
</layout>
</appender>
- <root>
- <level value="info"/>
+ <root level="info">
<appender-ref ref="console" />
</root>
</configuration></pre></div>
Modified: logback/trunk/logback-site/src/site/pages/manual/jmxConfig.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/jmxConfig.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/jmxConfig.html Wed Jan 21 22:57:21 2009
@@ -53,8 +53,7 @@
</layout>
</appender>
- <root>
- <level value="debug"/>
+ <root level="debug"/>
<appender-ref ref="console" />
</root>
</configuration></p>
Modified: logback/trunk/logback-site/src/site/pages/manual/joran.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/joran.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/joran.html Wed Jan 21 22:57:21 2009
@@ -846,8 +846,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<b><appender-ref ref="FILE" />
<appender-ref ref="STDOUT" /></b>
</root>
@@ -892,8 +891,7 @@
<appender-ref ref="STDOUT" />
</logger>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration></pre></div>
@@ -946,8 +944,7 @@
<appender-ref ref="FILE" />
</logger>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration></pre></div>
@@ -987,8 +984,7 @@
<appender-ref ref="FILE" />
</logger>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration></pre></div>
@@ -1043,8 +1039,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="FILE" />
</root>
</configuration></pre></div>
@@ -1072,8 +1067,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="FILE" />
</root>
</configuration></pre></div>
@@ -1180,8 +1174,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="FILE" />
</root>
</configuration></pre></div>
Modified: logback/trunk/logback-site/src/site/pages/manual/layouts.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/layouts.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/layouts.html Wed Jan 21 22:57:21 2009
@@ -166,8 +166,7 @@
<b><layout class="chapter5.MySampleLayout" /></b>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration></pre></div>
@@ -271,8 +270,7 @@
</layout>
</appender>
- <root>
- <level value="debug" />
+ <root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration></p>
@@ -1531,11 +1529,10 @@
<File>/test.html</File>
</appender>
- <root>
- <level value="debug" />
- <appender-ref ref="FILE" />
- </root>
-</configuration>
+ <root level="debug">
+ <appender-ref ref="FILE" />
+ </root>
+</configuration>
</div>
<p>Launching the <code>TrivialMain</code> application listed below
Modified: logback/trunk/logback-site/src/site/pages/manual/mdc.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/mdc.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/mdc.html Wed Jan 21 22:57:21 2009
@@ -425,8 +425,7 @@
</layout>
</appender>
- <root>
- <level value ="debug"/>
+ <root level="debug">
<appender-ref ref="CONSOLE"/>
</root>
</configuration></pre></div>
Modified: logback/trunk/logback-site/src/site/pages/news.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/news.html (original)
+++ logback/trunk/logback-site/src/site/pages/news.html Wed Jan 21 22:57:21 2009
@@ -37,7 +37,7 @@
reported by Alexis Morillo.
</p>
- <p>Added servleta for viewing internal status messages as an HTML
+ <p>Added a servlet for viewing internal status messages as an HTML
table. Two separate implementations are available; one for <a
href="manual/joran.html#viewingStatusMessages">logback-classic</a>
and the other for <a
@@ -51,7 +51,10 @@
href="http://jira.qos.ch/browse/LBCORE-77">LBCORE-77</a>.
</p>
-
+ <p>Fixed problem <a
+ href="http://jira.qos.ch/browse/LBCLASSIC-104">LBCLASSIC-104</a>
+ related to loss of MDC information in deferred logging events.
+ </p>
<h3>29th of December 2008 - Release of version 0.9.14</h3>
More information about the logback-dev
mailing list