[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><?xml version="1.0" encoding="UTF-8" ?>
-<configuration>
+<configuration>
<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" />
- </layout>
- </appender>
+ class="ch.qos.logback.core.ConsoleAppender">
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <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" />
- </layout>
- <param name="File"
- value="sample-log.txt" />
- </appender>
-
- <root>
- <level value="debug" />
- <appender-ref ref="STDOUT" />
- <appender-ref ref="FILE" />
- </root>
-</configuration></pre></div>
+ class="ch.qos.logback.core.FileAppender">
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
+ </layout>
+ <File>sample-log.txt</File>
+ </appender>
+
+ <root>
+ <level value="debug" />
+ <appender-ref ref="STDOUT" />
+ <appender-ref ref="FILE" />
+ </root>
+</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 @@
<configuration>
<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" />
- </layout>
- </appender>
+ class="ch.qos.logback.core.ConsoleAppender">
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <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" />
- </layout>
- <param name="File"
- value="sample-log.txt" />
- </appender>
+ class="ch.qos.logback.core.FileAppender">
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>
+ </layout>
+ <File>sample-log.txt</File>
+ </appender>
<b>
<logger name="chapter1">
<level value="info" />
More information about the logback-dev
mailing list