[logback-dev] svn commit: r1431 - in logback/trunk/logback-site/src/site/pages: . manual
noreply.seb at qos.ch
noreply.seb at qos.ch
Thu Mar 15 14:56:53 CET 2007
Author: seb
Date: Thu Mar 15 14:56:53 2007
New Revision: 1431
Modified:
logback/trunk/logback-site/src/site/pages/manual/joran.html
logback/trunk/logback-site/src/site/pages/news.html
Log:
Updated documentation
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 Thu Mar 15 14:56:53 2007
@@ -931,6 +931,54 @@
</root>
</configuration></pre></div>
+<a name="Include"></a>
+<h3>File inclusion</h3>
+
+<p>
+It is possible to include configuration elements into a <em>logback.xml</em>
+configuration file. This is done by using a <em>include</em> element, as shown
+in the example below:
+</p>
+
+<em>Example 3.18: File include (logback-examples/src/main/java/chapter3/redirectConfig.xml)</em>
+<div class="source"><pre><configuration>
+
+ <include file="path/to/included/configuration/file" />
+
+</configuration></pre></div>
+
+<p>
+The target file must have its elements nested inside an <em>included</em>
+element. For example, a <code>ConsoleAppender</code> would be declared this way:
+</p>
+
+<em>Example 3.18: File include (logback-examples/src/main/java/chapter3/includedConfig.xml)</em>
+<div class="source"><pre><included>
+
+ <appender name="redirectConsole"
+ class="ch.qos.logback.core.ConsoleAppender">
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <param name="Pattern" value="%d - %m%n" />
+ </layout>
+ </appender>
+
+ <root>
+ <level value="DEBUG" />
+ <appender-ref ref="redirectConsole" />
+ </root>
+
+</included></pre></div>
+
+<p>
+It is also possible to specify the file to be included by using a
+variable, in any of the ways explained above in this chapter.
+</p>
+
+<p>
+Included a file by specifying an <code>URL</code> is also possible. Instead of
+using the <em>file</em> attribute, add a <em>url</em> attribute to the
+<em>include</em> element.
+</p>
<a name="Joran"></a>
<h2>Using Joran in your own application</h2>
@@ -1168,7 +1216,7 @@
<p>The <em>calculator2.xml</em> file is a bit more complex, but much more interesting.</p>
<p>It contains the following elements:</p>
-<em>Example 3.18: Calculator configuration file (logback-examples/src/main/java/chapter3/calculator/calculator2.xml)</em>
+<em>Example 3.19: Calculator configuration file (logback-examples/src/main/java/chapter3/calculator/calculator2.xml)</em>
<div class="source"><pre><computation name="toto">
<literal value="7"/>
<literal value="3"/>
@@ -1194,7 +1242,7 @@
elements that contain instances of the same element. Here's the content of
<em>calculator3.xml</em>:</p>
-<em>Example 3.19: Calculator configuration file (logback-examples/src/main/java/chapter3/calculator/calculator3.xml)</em>
+<em>Example 3.20: Calculator configuration file (logback-examples/src/main/java/chapter3/calculator/calculator3.xml)</em>
<div class="source"><pre><computation name="toto">
<computation>
<literal value="7"/>
@@ -1242,7 +1290,7 @@
<p>Using new rule declarations, the preceding example, involving the calculation, could be
expressed this way:</p>
-<em>Example 3.20: Configuration file using new rules on the fly (logback-examples/src/main/java/chapter3/newrule/new-rule.xml)</em>
+<em>Example 3.21: Configuration file using new rules on the fly (logback-examples/src/main/java/chapter3/newrule/new-rule.xml)</em>
<div class="source"><pre><computation name="toto">
<new-rule pattern="*/computation/literal"
actionClass="chapter3.calculator.LiteralAction"/>
@@ -1342,7 +1390,7 @@
<p>The <em>implicit1.xml</em> file contains the following lines:</p>
-<em>Example 3.21: Usage of implicit rules (logback-examples/src/main/java/chapter3/implicit/implicit1.xml)</em>
+<em>Example 3.22: Usage of implicit rules (logback-examples/src/main/java/chapter3/implicit/implicit1.xml)</em>
<div class="source"><pre><foo>
<xyz printme="true">
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 Thu Mar 15 14:56:53 2007
@@ -28,6 +28,17 @@
<hr width="80%" align="center" />
+ <h3>MMMM Dth, 2007 - Release of version 0.9.Y</h3>
+
+ <p>
+ Includes in configuration files are now supported by Joran, logback's
+ configuration framework. A file can contain an <em>include</em> element
+ that has a <em>file</em> or <em>url</em> attribute pointing to a configuration file.
+ See the <a href="manual/joran.html#Include">chapter about configuration</a> in the logback's
+ online manual for more information.
+ </p>
+
+
<h3>March 5th, 2007 - Release of version 0.9.2</h3>
<p>The documentation is now in the <em>docs/</em> directory to allow an
More information about the logback-dev
mailing list