[logback-dev] svn commit: r1577 - in logback/trunk: logback-classic/src/main/java/ch/qos/logback/classic/joran logback-core/src/main/java/ch/qos/logback/core/joran/action logback-core/src/test/java/ch/qos/logback/core/joran/action logback-examples/src/main/java/chapter3 logback-site/src/site/pages logback-site/src/site/pages/manual
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Wed Aug 22 20:49:24 CEST 2007
Author: ceki
Date: Wed Aug 22 20:49:23 2007
New Revision: 1577
Added:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/IncludeAction.java
- copied, changed from r1573, /logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/IncludeFileAction.java
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
- copied, changed from r1576, /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeFileActionTest.java
Removed:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/IncludeFileAction.java
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeFileActionTest.java
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/JoranConfigurator.java
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/PackageTest.java
logback/trunk/logback-examples/src/main/java/chapter3/redirectConfig.xml
logback/trunk/logback-site/src/site/pages/manual/joran.html
logback/trunk/logback-site/src/site/pages/news.html
Log:
- renamed IncludeFileAction as IncludeAction.java
- other related (but minor) fixes
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/JoranConfigurator.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/JoranConfigurator.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/JoranConfigurator.java Wed Aug 22 20:49:23 2007
@@ -21,7 +21,7 @@
import ch.qos.logback.classic.joran.action.RootLoggerAction;
import ch.qos.logback.core.joran.JoranConfiguratorBase;
import ch.qos.logback.core.joran.action.AppenderRefAction;
-import ch.qos.logback.core.joran.action.IncludeFileAction;
+import ch.qos.logback.core.joran.action.IncludeAction;
import ch.qos.logback.core.joran.action.MatcherAction;
import ch.qos.logback.core.joran.spi.Pattern;
import ch.qos.logback.core.joran.spi.RuleStore;
@@ -66,7 +66,7 @@
if(PlatformInfo.hasJMXObjectName()) {
rs.addRule(new Pattern("configuration/jmxConfigurator"), new JMXConfiguratorAction());
}
- rs.addRule(new Pattern("configuration/include"), new IncludeFileAction());
+ rs.addRule(new Pattern("configuration/include"), new IncludeAction());
rs.addRule(new Pattern("configuration/consolePlugin"), new ConsolePluginAction());
}
Copied: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/IncludeAction.java (from r1573, /logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/IncludeFileAction.java)
==============================================================================
--- /logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/IncludeFileAction.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/IncludeAction.java Wed Aug 22 20:49:23 2007
@@ -26,7 +26,7 @@
import ch.qos.logback.core.util.Loader;
import ch.qos.logback.core.util.OptionHelper;
-public class IncludeFileAction extends Action {
+public class IncludeAction extends Action {
private static final String INCLUDED_TAG = "included";
private static final String FILE_ATTR = "file";
Copied: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java (from r1576, /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeFileActionTest.java)
==============================================================================
--- /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeFileActionTest.java (original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java Wed Aug 22 20:49:23 2007
@@ -18,7 +18,7 @@
import ch.qos.logback.core.status.StatusChecker;
import ch.qos.logback.core.util.StatusPrinter;
-public class IncludeFileActionTest extends TestCase {
+public class IncludeActionTest extends TestCase {
final static String FILE_KEY = "testing";
@@ -42,12 +42,12 @@
static final String INCLUDED_AS_RESOURCE = "input/joran/inclusion/includedAsResource.xml";
- public IncludeFileActionTest(String arg0) {
+ public IncludeActionTest(String arg0) {
super(arg0);
HashMap<Pattern, Action> rulesMap = new HashMap<Pattern, Action>();
rulesMap.put(new Pattern("x"), new NOPAction());
rulesMap.put(new Pattern("x/inc"), new IncAction());
- rulesMap.put(new Pattern("x/include"), new IncludeFileAction());
+ rulesMap.put(new Pattern("x/include"), new IncludeAction());
tc = new TrivialConfigurator(rulesMap);
tc.setContext(context);
Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/PackageTest.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/PackageTest.java (original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/PackageTest.java Wed Aug 22 20:49:23 2007
@@ -18,7 +18,7 @@
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(PropertyActionTest.class);
- suite.addTestSuite(IncludeFileActionTest.class);
+ suite.addTestSuite(IncludeActionTest.class);
return suite;
}
Modified: logback/trunk/logback-examples/src/main/java/chapter3/redirectConfig.xml
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter3/redirectConfig.xml (original)
+++ logback/trunk/logback-examples/src/main/java/chapter3/redirectConfig.xml Wed Aug 22 20:49:23 2007
@@ -2,6 +2,6 @@
<configuration>
- <include file="path/to/included/configuration/file" />
+ <include file="path/to/configuration/file" />
</configuration>
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 Aug 22 20:49:23 2007
@@ -1027,9 +1027,7 @@
<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" />
-
+ <b><include file="path/to/configuration/file"/></b>
</configuration></pre></div>
<p>
@@ -1054,15 +1052,11 @@
</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>The file to be included can be referenced as a URL or as a
+resource. To reference a URL use the <code>url</code> attribute
+instead of the file attribute in the previous example. To reference a
+resource, use the <code>resource</code> attribute instead of the file
+attribute in the previous example.
</p>
<a name="Joran"></a>
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 Aug 22 20:49:23 2007
@@ -38,6 +38,13 @@
by Sebastian Davids.
</p>
+ <p>It is now possible to include configuration file fragments (in
+ XML) as a resource. Previously, it was only possible to include a
+ file by specifying a path to a file or a URL. This feature was
+ requested by Michael Newcomb in <a
+ href="http://bugzilla.qos.ch/show_bug.cgi?id=89">bug 89</a>.
+ </p>
+
<p>Fixed caller data extraction problem as reported in <a
href="http://bugzilla.qos.ch/show_bug.cgi?id=78">bug 78</a> by Hans
van der Meer.
More information about the logback-dev
mailing list