You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2012/10/27 20:17:59 UTC
svn commit: r1402832 - in /logging/log4j/log4j2/trunk:
api/src/main/java/org/apache/logging/log4j/
api/src/test/resources/META-INF/ core/src/main/resources/META-INF/
src/changes/
Author: rgoers
Date: Sat Oct 27 18:17:58 2012
New Revision: 1402832
URL: http://svn.apache.org/viewvc?rev=1402832&view=rev
Log:
LOG4J2-104 - Convert LogManager binding to use regular java properties instead of XML properties to workaround a bug in Oracle's xmlparserv2 jar
Added:
logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.properties
- copied, changed from r1399852, logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.xml
logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.properties
- copied, changed from r1399852, logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.xml
Removed:
logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.xml
logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.xml
Modified:
logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java
logging/log4j/log4j2/trunk/src/changes/changes.xml
Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java?rev=1402832&r1=1402831&r2=1402832&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java (original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/LogManager.java Sat Oct 27 18:17:58 2012
@@ -39,7 +39,7 @@ public class LogManager {
*/
public static final String ROOT_LOGGER_NAME = "";
- private static final String LOGGER_RESOURCE = "META-INF/log4j-provider.xml";
+ private static final String LOGGER_RESOURCE = "META-INF/log4j-provider.properties";
private static final String LOGGER_CONTEXT_FACTORY = "LoggerContextFactory";
private static final String API_VERSION = "Log4jAPIVersion";
private static final String FACTORY_PRIORITY = "FactoryPriority";
@@ -95,7 +95,7 @@ public class LogManager {
Properties props = new Properties();
URL url = enumResources.nextElement();
try {
- props.loadFromXML(url.openStream());
+ props.load(url.openStream());
} catch (IOException ioe) {
logger.error("Unable to read " + url.toString(), ioe);
}
Copied: logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.properties (from r1399852, logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.xml)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.properties?p2=logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.properties&p1=logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.xml&r1=1399852&r2=1402832&rev=1402832&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.xml (original)
+++ logging/log4j/log4j2/trunk/api/src/test/resources/META-INF/log4j-provider.properties Sat Oct 27 18:17:58 2012
@@ -1,7 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
-<properties>
- <entry key="LoggerContextFactory">org.apache.logging.log4j.TestLoggerContextFactory</entry>
- <entry key="Log4jAPIVersion">2.0.0</entry>
- <entry key="FactoryPriority">0</entry>
-</properties>
\ No newline at end of file
+LoggerContextFactory = org.apache.logging.log4j.TestLoggerContextFactory
+Log4jAPIVersion = 2.0.0
+FactoryPriority = 0
\ No newline at end of file
Copied: logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.properties (from r1399852, logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.xml)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.properties?p2=logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.properties&p1=logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.xml&r1=1399852&r2=1402832&rev=1402832&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/main/resources/META-INF/log4j-provider.properties Sat Oct 27 18:17:58 2012
@@ -1,24 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
-<properties>
- <entry key="LoggerContextFactory">org.apache.logging.log4j.core.impl.Log4jContextFactory</entry>
- <entry key="Log4jAPIVersion">2.0.0</entry>
- <entry key="FactoryPriority">10</entry>
-</properties>
\ No newline at end of file
+LoggerContextFactory = org.apache.logging.log4j.core.impl.Log4jContextFactory
+Log4jAPIVersion = 2.0.0
+FactoryPriority= 10
\ No newline at end of file
Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1402832&r1=1402831&r2=1402832&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Sat Oct 27 18:17:58 2012
@@ -23,6 +23,10 @@
<body>
<release version="2.0-beta3" date="TBD" description= "Bug fixes and enhancements">
+ <action issue="LOG4J2-104" dev="rgoers" type="fix">
+ Convert LogManager binding to use "regular" java properties instead of XML properties to workaround a
+ bug in Oracle's xmlparserv2 jar.
+ </action>
<action issue="LOG4J2-28" dev="rgoers" type="add">
Added PropertiesRewritePolicy and ability to define properties on a Logger.
</action>