[logback-dev] svn commit: r1428 - in logback/trunk/logback-classic/src: main/java/ch/qos/logback/classic/joran main/java/ch/qos/logback/classic/joran/action test/input/joran test/java/ch/qos/logback/classic/joran
noreply.seb at qos.ch
noreply.seb at qos.ch
Wed Mar 14 21:16:22 CET 2007
Author: seb
Date: Wed Mar 14 21:16:21 2007
New Revision: 1428
Added:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/IncludeFileAction.java
- copied, changed from r1427, /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LoadConfigurationFileAction.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/IncludeFileActionTest.java
- copied, changed from r1427, /logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/LoadConfigurationFileTest.java
Removed:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LoadConfigurationFileAction.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/LoadConfigurationFileTest.java
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/JoranConfigurator.java
logback/trunk/logback-classic/src/test/input/joran/invalidRedirect.xml
logback/trunk/logback-classic/src/test/input/joran/redirectConfig.xml
logback/trunk/logback-classic/src/test/input/joran/redirectToInvalid.xml
logback/trunk/logback-classic/src/test/input/joran/redirectWithSubst.xml
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/PackageTest.java
Log:
Renamed LoadConfigurationFileAction.java to IncludeFileAction.java
Same for test class.
Renamed "path" attribute to "file"
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 Mar 14 21:16:21 2007
@@ -15,7 +15,7 @@
import ch.qos.logback.classic.joran.action.JMXConfiguratorAction;
import ch.qos.logback.classic.joran.action.LayoutAction;
import ch.qos.logback.classic.joran.action.LevelAction;
-import ch.qos.logback.classic.joran.action.LoadConfigurationFileAction;
+import ch.qos.logback.classic.joran.action.IncludeFileAction;
import ch.qos.logback.classic.joran.action.LoggerAction;
import ch.qos.logback.classic.joran.action.RootLoggerAction;
import ch.qos.logback.core.joran.JoranConfiguratorBase;
@@ -59,7 +59,7 @@
new LayoutAction());
rs.addRule(new Pattern("configuration/jmxConfigurator"), new JMXConfiguratorAction());
- rs.addRule(new Pattern("configuration/include"), new LoadConfigurationFileAction());
+ rs.addRule(new Pattern("configuration/include"), new IncludeFileAction());
}
}
Copied: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/IncludeFileAction.java (from r1427, /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LoadConfigurationFileAction.java)
==============================================================================
--- /logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LoadConfigurationFileAction.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/IncludeFileAction.java Wed Mar 14 21:16:21 2007
@@ -22,17 +22,17 @@
import ch.qos.logback.core.joran.spi.InterpretationContext;
import ch.qos.logback.core.joran.spi.JoranException;
-public class LoadConfigurationFileAction extends Action {
+public class IncludeFileAction extends Action {
private static final String INCLUDED_TAG = "included";
- private static final String PATH_ATTR = "path";
+ private static final String FILE_ATTR = "file";
private SaxEventRecorder recorder;
@Override
public void begin(InterpretationContext ec, String name, Attributes attributes)
throws ActionException {
- String attribute = attributes.getValue(PATH_ATTR);
+ String attribute = attributes.getValue(FILE_ATTR);
if (attribute == null) {
addError("Path to configuration file to include is not set.");
return;
Modified: logback/trunk/logback-classic/src/test/input/joran/invalidRedirect.xml
==============================================================================
--- logback/trunk/logback-classic/src/test/input/joran/invalidRedirect.xml (original)
+++ logback/trunk/logback-classic/src/test/input/joran/invalidRedirect.xml Wed Mar 14 21:16:21 2007
@@ -3,6 +3,6 @@
<configuration>
- <include path="toto" />
+ <include file="toto" />
</configuration>
Modified: logback/trunk/logback-classic/src/test/input/joran/redirectConfig.xml
==============================================================================
--- logback/trunk/logback-classic/src/test/input/joran/redirectConfig.xml (original)
+++ logback/trunk/logback-classic/src/test/input/joran/redirectConfig.xml Wed Mar 14 21:16:21 2007
@@ -3,6 +3,6 @@
<configuration>
- <include path="src/test/input/joran/simpleConfig.xml" />
+ <include file="src/test/input/joran/simpleConfig.xml" />
</configuration>
Modified: logback/trunk/logback-classic/src/test/input/joran/redirectToInvalid.xml
==============================================================================
--- logback/trunk/logback-classic/src/test/input/joran/redirectToInvalid.xml (original)
+++ logback/trunk/logback-classic/src/test/input/joran/redirectToInvalid.xml Wed Mar 14 21:16:21 2007
@@ -3,6 +3,6 @@
<configuration>
- <include path="src/test/input/joran/invalidConfig.xml" />
+ <include file="src/test/input/joran/invalidConfig.xml" />
</configuration>
Modified: logback/trunk/logback-classic/src/test/input/joran/redirectWithSubst.xml
==============================================================================
--- logback/trunk/logback-classic/src/test/input/joran/redirectWithSubst.xml (original)
+++ logback/trunk/logback-classic/src/test/input/joran/redirectWithSubst.xml Wed Mar 14 21:16:21 2007
@@ -5,6 +5,6 @@
<substitutionProperty name="path.to.file"
value="src/test/input/joran/simpleConfig.xml" />
- <include path="${path.to.file}" />
+ <include file="${path.to.file}" />
</configuration>
Copied: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/IncludeFileActionTest.java (from r1427, /logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/LoadConfigurationFileTest.java)
==============================================================================
--- /logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/LoadConfigurationFileTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/IncludeFileActionTest.java Wed Mar 14 21:16:21 2007
@@ -4,17 +4,17 @@
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.PatternLayout;
-import ch.qos.logback.classic.joran.action.LoadConfigurationFileAction;
+import ch.qos.logback.classic.joran.action.IncludeFileAction;
import ch.qos.logback.classic.util.Constants;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.ConsoleAppender;
import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.status.Status;
-public class LoadConfigurationFileTest extends TestCase {
+public class IncludeFileActionTest extends TestCase {
LoggerContext context;
- LoadConfigurationFileAction action;
+ IncludeFileAction action;
String filePath = Constants.TEST_DIR_PREFIX
+ "input/joran/redirectConfig.xml";
@@ -29,7 +29,7 @@
protected void setUp() throws Exception {
super.setUp();
context = new LoggerContext();
- action = new LoadConfigurationFileAction();
+ action = new IncludeFileAction();
action.setContext(context);
}
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/PackageTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/PackageTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/joran/PackageTest.java Wed Mar 14 21:16:21 2007
@@ -17,7 +17,7 @@
TestSuite suite = new TestSuite();
suite.addTestSuite(BasicJoranTest.class);
suite.addTestSuite(EvaluatorJoranTest.class);
- suite.addTestSuite(LoadConfigurationFileTest.class);
+ suite.addTestSuite(IncludeFileActionTest.class);
return suite;
}
}
\ No newline at end of file
More information about the logback-dev
mailing list