[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


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 @@
+<a name="Include"></a>
+<h3>File inclusion</h3>
+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:
+<em>Example 3.18: File include (logback-examples/src/main/java/chapter3/redirectConfig.xml)</em>
+<div class="source"><pre>&lt;configuration>
+  &lt;include file="path/to/included/configuration/file" />
+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:
+<em>Example 3.18: File include (logback-examples/src/main/java/chapter3/includedConfig.xml)</em>
+<div class="source"><pre>&lt;included>
+  &lt;appender name="redirectConsole"
+    class="ch.qos.logback.core.ConsoleAppender">
+    &lt;layout class="ch.qos.logback.classic.PatternLayout">
+      &lt;param name="Pattern" value="%d - %m%n" />
+    &lt;/layout>
+  &lt;/appender>
+  &lt;root>
+    &lt;level value="DEBUG" />
+    &lt;appender-ref ref="redirectConsole" />
+  &lt;/root>
+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.
+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.
 <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>&lt;computation name="toto"&gt;
   &lt;literal value="7"/&gt;
   &lt;literal value="3"/&gt;
@@ -1194,7 +1242,7 @@
 elements that contain instances of the same element. Here's the content of
-<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>&lt;computation name="toto"&gt;
     &lt;literal value="7"/&gt;
@@ -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>&lt;computation name="toto"&gt;
   &lt;new-rule pattern="*/computation/literal" 
@@ -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>&lt;foo&gt;
   &lt;xyz printme="true"&gt;

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