You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2007/04/26 20:06:17 UTC
svn commit: r532828 - in /logging/sandbox/log4j/component: build.xml
src/main/java/org/apache/log4j/plugins/PluginConfigurator.java
src/main/resources/org/apache/log4j/plugins/log4j.dtd
Author: carnold
Date: Thu Apr 26 11:06:16 2007
New Revision: 532828
URL: http://svn.apache.org/viewvc?view=rev&rev=532828
Log:
Bug 42094: PluginConfigurator tweaks
Modified:
logging/sandbox/log4j/component/build.xml
logging/sandbox/log4j/component/src/main/java/org/apache/log4j/plugins/PluginConfigurator.java
logging/sandbox/log4j/component/src/main/resources/org/apache/log4j/plugins/log4j.dtd
Modified: logging/sandbox/log4j/component/build.xml
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/component/build.xml?view=diff&rev=532828&r1=532827&r2=532828
==============================================================================
--- logging/sandbox/log4j/component/build.xml (original)
+++ logging/sandbox/log4j/component/build.xml Thu Apr 26 11:06:16 2007
@@ -67,7 +67,7 @@
target="${javac.target}"
source="${javac.source}"
classpath="${log4j.jar}"/>
- <copy todir="target/classes">
+ <copy todir="target/classes" overwrite="true">
<fileset dir="src/main/resources"/>
</copy>
</target>
@@ -98,14 +98,14 @@
target="${javac.target}"
source="${javac.source}"
classpath="${log4j.jar}:${junit.jar}:target/classes"/>
- <copy todir="target/test-classes">
+ <copy todir="target/test-classes" overwrite="true">
<fileset dir="src/test/resources"/>
</copy>
</target>
<target name="test" depends="test-compile" description="Run unit tests">
- <junit printsummary="yes">
+ <junit printsummary="yes" fork="true" dir="target">
<classpath path="target/test-classes:target/classes:${log4j.jar}"/>
<batchtest>
<fileset dir="src/test/java/">
Modified: logging/sandbox/log4j/component/src/main/java/org/apache/log4j/plugins/PluginConfigurator.java
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/component/src/main/java/org/apache/log4j/plugins/PluginConfigurator.java?view=diff&rev=532828&r1=532827&r2=532828
==============================================================================
--- logging/sandbox/log4j/component/src/main/java/org/apache/log4j/plugins/PluginConfigurator.java (original)
+++ logging/sandbox/log4j/component/src/main/java/org/apache/log4j/plugins/PluginConfigurator.java Thu Apr 26 11:06:16 2007
@@ -261,7 +261,7 @@
"] which does not implement org.apache.log4j.spi.AppenderAttachable.");
}
} else {
- parseUnrecognizedElement(instance, appenderElement, props);
+ parseUnrecognizedElement(instance, currentElement, props);
}
}
}
@@ -890,7 +890,9 @@
parseRoot(currentElement);
} else if(tagName.equals(RENDERER_TAG)) {
parseRenderer(currentElement);
- } else if (!tagName.equals(CATEGORY_FACTORY_TAG)) {
+ } else if (!(tagName.equals(APPENDER_TAG)
+ || tagName.equals(CATEGORY_FACTORY_TAG)
+ || tagName.equals(LOGGER_FACTORY_TAG))) {
quietParseUnrecognizedElement(repository, currentElement, props);
}
}
@@ -1014,7 +1016,7 @@
public InputSource resolveEntity (String publicId, String systemId) {
if (systemId.endsWith("log4j.dtd")) {
Class clazz = getClass();
- InputStream in = Log4jEntityResolver.class.getResourceAsStream("log4j.dtd");
+ InputStream in = clazz.getResourceAsStream("log4j.dtd");
if (in == null) {
LogLog.error("Could not find [log4j.dtd]. Used [" + clazz.getClassLoader()
+ "] class loader in the search.");
Modified: logging/sandbox/log4j/component/src/main/resources/org/apache/log4j/plugins/log4j.dtd
URL: http://svn.apache.org/viewvc/logging/sandbox/log4j/component/src/main/resources/org/apache/log4j/plugins/log4j.dtd?view=diff&rev=532828&r1=532827&r2=532828
==============================================================================
--- logging/sandbox/log4j/component/src/main/resources/org/apache/log4j/plugins/log4j.dtd (original)
+++ logging/sandbox/log4j/component/src/main/resources/org/apache/log4j/plugins/log4j.dtd Thu Apr 26 11:06:16 2007
@@ -136,14 +136,14 @@
>
<!ELEMENT triggeringPolicy ((param|filter)*)>
-<!ATTLIST plugin
- name CDATA #REQUIRED
+<!ATTLIST triggeringPolicy
+ name CDATA #IMPLIED
class CDATA #REQUIRED
>
<!ELEMENT rollingPolicy (param*)>
-<!ATTLIST plugin
- name CDATA #REQUIRED
+<!ATTLIST rollingPolicy
+ name CDATA #IMPLIED
class CDATA #REQUIRED
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org