[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>&lt;configuration>
   &lt;appender name="CONSOLE"
     class="ch.qos.logback.core.ConsoleAppender">
@@ -203,8 +203,7 @@
       &lt;/pattern>
     &lt;/layout>
   &lt;/appender>
-  &lt;root>
-    &lt;level value="DEBUG" />
+  &lt;root level="DEBUG">
     &lt;appender-ref ref="CONSOLE" />
   &lt;/root>
 &lt;/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>&lt;configuration>
   &lt;appender name="CONSOLE"
     class="ch.qos.logback.core.ConsoleAppender">
@@ -231,8 +230,7 @@
       &lt;/pattern>
     &lt;/layout>
   &lt;/appender>
-  &lt;root>
-    &lt;level value="DEBUG" />
+  &lt;root level="DEBUG">
     &lt;appender-ref ref="CONSOLE" />
   &lt;/root>
 &lt;/configuration></pre></div>
@@ -361,15 +359,14 @@
       &lt;OnMismatch>NEUTRAL&lt;/OnMismatch>
       &lt;OnMatch>DENY&lt;/OnMatch>
     &lt;/filter></b>
-    &lt;layout class="ch.qos.logback.classic.PatternLayout">
+    &lt;layout>
       &lt;pattern>
         %-4relative [%thread] %-5level %logger - %msg%n
       &lt;/pattern>
     &lt;/layout>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="INFO" />
+  &lt;root level="INFO">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
 &lt;/configuration></pre></div>
@@ -594,8 +591,7 @@
   &lt;/layout>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="info"/>
+  &lt;root level="info">
     &lt;appender-ref ref="console" />
   &lt;/root>  
 &lt;/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 @@
     &lt;/layout>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="debug"/>
+  &lt;root level="debug"/>
     &lt;appender-ref ref="console" />
   &lt;/root>  
 &lt;/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 @@
     &lt;/layout>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     <b>&lt;appender-ref ref="FILE" />
     &lt;appender-ref ref="STDOUT" /></b>
   &lt;/root>
@@ -892,8 +891,7 @@
     &lt;appender-ref ref="STDOUT" />
   &lt;/logger>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
 &lt;/configuration></pre></div>
@@ -946,8 +944,7 @@
     &lt;appender-ref ref="FILE" />
   &lt;/logger>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
 &lt;/configuration></pre></div>
@@ -987,8 +984,7 @@
     &lt;appender-ref ref="FILE" />
   &lt;/logger>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
 &lt;/configuration></pre></div>
@@ -1043,8 +1039,7 @@
     &lt;/layout>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     &lt;appender-ref ref="FILE" />
   &lt;/root>
 &lt;/configuration></pre></div>
@@ -1072,8 +1067,7 @@
     &lt;/layout>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     &lt;appender-ref ref="FILE" />
   &lt;/root>
 &lt;/configuration></pre></div>
@@ -1180,8 +1174,7 @@
     &lt;/layout>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     &lt;appender-ref ref="FILE" />
   &lt;/root>
 &lt;/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>&lt;layout class="chapter5.MySampleLayout" /></b>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
 &lt;/configuration></pre></div>
@@ -271,8 +270,7 @@
     &lt;/layout>
   &lt;/appender>
 
-  &lt;root>
-    &lt;level value="debug" />
+  &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
 &lt;/configuration></p>
@@ -1531,11 +1529,10 @@
    &lt;File&gt;/test.html&lt;/File&gt;
   &lt;/appender&gt;
 
-  &lt;root&gt;
-    &lt;level value="debug" /&gt;
-    &lt;appender-ref ref="FILE" /&gt;
-  &lt;/root&gt;
-&lt;/configuration&gt;
+  &lt;root level="debug">
+    &lt;appender-ref ref="FILE" />
+  &lt;/root>
+&lt;/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 @@
     &lt;/layout>	    
   &lt;/appender>
   
-  &lt;root>
-    &lt;level value ="debug"/>
+  &lt;root level="debug">
     &lt;appender-ref ref="CONSOLE"/>
   &lt;/root>  
 &lt;/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