[logback-dev] svn commit: r1173 - in logback/trunk: logback-examples/src/main/java/chapter1 logback-site/src/site/xdocTemplates

noreply.seb at qos.ch noreply.seb at qos.ch
Mon Jan 8 20:14:45 CET 2007


Author: seb
Date: Mon Jan  8 20:14:45 2007
New Revision: 1173

Modified:
   logback/trunk/logback-examples/src/main/java/chapter1/sample-config-2.xml
   logback/trunk/logback-examples/src/main/java/chapter1/sample-config-3.xml
   logback/trunk/logback-site/src/site/xdocTemplates/shortIntro.xml

Log:
minor modifications

Modified: logback/trunk/logback-examples/src/main/java/chapter1/sample-config-2.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter1/sample-config-2.xml	(original)
+++ logback/trunk/logback-examples/src/main/java/chapter1/sample-config-2.xml	Mon Jan  8 20:14:45 2007
@@ -5,19 +5,16 @@
 	<appender name="STDOUT"
 		class="ch.qos.logback.core.ConsoleAppender">
 		<layout class="ch.qos.logback.classic.PatternLayout">
-			<param name="pattern"
-				value="%-4relative [%thread] %-5level %class - %msg%n" />
+			<pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
 		</layout>
 	</appender>
 
 	<appender name="FILE"
 		class="ch.qos.logback.core.FileAppender">
 		<layout class="ch.qos.logback.classic.PatternLayout">
-			<param name="pattern"
-				value="%-4relative [%thread] %-5level %class - %msg%n" />
+			<pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
 		</layout>
-		<param name="File"
-			value="sample-log.txt" />
+		<File>sample-log.txt</File>
 	</appender>
 
 	<root>

Modified: logback/trunk/logback-examples/src/main/java/chapter1/sample-config-3.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter1/sample-config-3.xml	(original)
+++ logback/trunk/logback-examples/src/main/java/chapter1/sample-config-3.xml	Mon Jan  8 20:14:45 2007
@@ -5,21 +5,18 @@
 	<appender name="STDOUT"
 		class="ch.qos.logback.core.ConsoleAppender">
 		<layout class="ch.qos.logback.classic.PatternLayout">
-			<param name="pattern"
-				value="%-4relative [%thread] %-5level %class - %msg%n" />
+			<pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
 		</layout>
 	</appender>
 
 	<appender name="FILE"
 		class="ch.qos.logback.core.FileAppender">
 		<layout class="ch.qos.logback.classic.PatternLayout">
-			<param name="pattern"
-				value="%-4relative [%thread] %-5level %class - %msg%n" />
+			<pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
 		</layout>
-		<param name="File"
-			value="sample-log.txt" />
+		<File>sample-log.txt</File>
 	</appender>
-
+	
 	<logger name="chapter1">
 		<level value="info" />
 	</logger>

Modified: logback/trunk/logback-site/src/site/xdocTemplates/shortIntro.xml
==============================================================================
--- logback/trunk/logback-site/src/site/xdocTemplates/shortIntro.xml	(original)
+++ logback/trunk/logback-site/src/site/xdocTemplates/shortIntro.xml	Mon Jan  8 20:14:45 2007
@@ -1122,7 +1122,7 @@
 	
 	<p>To run this examle, use this command:</p>
 	
-<div class="source"><pre>java chapter1.MyApp <b>HOW ABOUT PATH?</b>sample-config-1.xml</pre></div>
+<div class="source"><pre>java chapter1.MyApp src/main/java/chapter1/sample-config-1.xml</pre></div>
 
 	<p>The console output will be exactly the same as before. However,
 	this time, we didn't need to import and call the BasicConfigurator
@@ -1148,32 +1148,29 @@
 <em>Example 1.5: Logback configuration from file (logback-examples/src/main/java/chapter1/sample-config-2.xml)</em>
 <div class="source"><pre>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
 
-&lt;configuration&gt;
+&lt;configuration>
 
   &lt;appender name="STDOUT"
-      class="ch.qos.logback.core.ConsoleAppender"&gt;
-    &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
-      &lt;param name="pattern"
-        value="%-4relative [%thread] %-5level %class - %msg%n" /&gt;
-    &lt;/layout&gt;
-  &lt;/appender&gt;
+    class="ch.qos.logback.core.ConsoleAppender">
+    &lt;layout class="ch.qos.logback.classic.PatternLayout">
+      &lt;pattern>%-4relative [%thread] %-5level %class - %msg%n&lt;/pattern>
+    &lt;/layout>
+  &lt;/appender>
 
   &lt;appender name="FILE"
-      class="ch.qos.logback.core.FileAppender"&gt;
-    &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
-      &lt;param name="pattern"
-        value="%-4relative [%thread] %-5level %class - %msg%n" /&gt;
-    &lt;/layout&gt;
-    &lt;param name="File"
-      value="sample-log.txt" /&gt;
-  &lt;/appender&gt;
-
-  &lt;root&gt;
-    &lt;level value="debug" /&gt;
-    &lt;appender-ref ref="STDOUT" /&gt;
-    &lt;appender-ref ref="FILE" /&gt;
-  &lt;/root&gt;
-&lt;/configuration&gt;</pre></div>
+    class="ch.qos.logback.core.FileAppender">
+    &lt;layout class="ch.qos.logback.classic.PatternLayout">
+      &lt;pattern>%-4relative [%thread] %-5level %class - %msg%n&lt;/pattern>
+    &lt;/layout>
+    &lt;File>sample-log.txt&lt;/File>
+  &lt;/appender>
+
+  &lt;root>
+    &lt;level value="debug" />
+    &lt;appender-ref ref="STDOUT" />
+    &lt;appender-ref ref="FILE" />
+  &lt;/root>
+&lt;/configuration></pre></div>
 	
 	<p>Now, all the logging statements are directed to the console and
 	to a file named <em>sample-log.txt</em>.  As you can see, the
@@ -1194,22 +1191,19 @@
 &lt;configuration&gt;
 
   &lt;appender name="STDOUT"
-      class="ch.qos.logback.core.ConsoleAppender"&gt;
-    &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
-      &lt;param name="pattern"
-          value="%-4relative [%thread] %-5level %class - %msg%n" /&gt;
-    &lt;/layout&gt;
-  &lt;/appender&gt;
+    class="ch.qos.logback.core.ConsoleAppender">
+    &lt;layout class="ch.qos.logback.classic.PatternLayout">
+      &lt;pattern>%-4relative [%thread] %-5level %class - %msg%n&lt;/pattern>
+    &lt;/layout>
+  &lt;/appender>
 
   &lt;appender name="FILE"
-      class="ch.qos.logback.core.FileAppender"&gt;
-    &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
-      &lt;param name="pattern"
-          value="%-4relative [%thread] %-5level %class - %msg%n" /&gt;
-    &lt;/layout&gt;
-      &lt;param name="File"
-          value="sample-log.txt" /&gt;
-  &lt;/appender&gt;
+    class="ch.qos.logback.core.FileAppender">
+    &lt;layout class="ch.qos.logback.classic.PatternLayout">
+      &lt;pattern>%-4relative [%thread] %-5level %class - %msg%n&lt;/pattern>
+    &lt;/layout>
+    &lt;File>sample-log.txt&lt;/File>
+  &lt;/appender>
 <b>
   &lt;logger name="chapter1"&gt;
     &lt;level value="info" /&gt;



More information about the logback-dev mailing list