Repository: logging-log4j2 Updated Branches: refs/heads/master 23af5afe6 -> 375d363f2
[LOG4J2-912] XML configuration does not report full error message for XInclude parser configuration problems. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/375d363f Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/375d363f Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/375d363f Branch: refs/heads/master Commit: 375d363f2d2e9587574b02a66a7789bf83302b63 Parents: 23af5af Author: Gary Gregory <[email protected]> Authored: Mon Dec 1 20:33:05 2014 -0500 Committer: Gary Gregory <[email protected]> Committed: Mon Dec 1 20:33:05 2014 -0500 ---------------------------------------------------------------------- .../logging/log4j/core/config/xml/XmlConfiguration.java | 12 ++++++------ src/changes/changes.xml | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/375d363f/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java index 8962443..c094137 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java @@ -96,27 +96,27 @@ public class XmlConfiguration extends AbstractConfiguration implements Reconfigu // -DLog4j.XInclude=true factory.setXIncludeAware(true); } catch (final UnsupportedOperationException e) { - LOGGER.warn("The DocumentBuilderFactory does not support XInclude: {}", factory, e); + LOGGER.warn("The DocumentBuilderFactory [{}] does not support XInclude: {}", factory, e); } catch (@SuppressWarnings("ErrorNotRethrown") final AbstractMethodError err) { - LOGGER.warn("The DocumentBuilderFactory is out of date and does not support XInclude: {}", factory, err); + LOGGER.warn("The DocumentBuilderFactory [{}] is out of date and does not support XInclude: {}", factory, err); } try { // Alternative: We could specify all features and values with system properties like: // -DLog4j.DocumentBuilderFactory.Feature="http://apache.org/xml/features/xinclude/fixup-base-uris true" factory.setFeature(XINCLUDE_FIXUP_BASE_URIS, true); } catch (final ParserConfigurationException e) { - LOGGER.warn("The DocumentBuilderFactory [{}] does not support the feature [{}].", factory, + LOGGER.warn("The DocumentBuilderFactory [{}] does not support the feature [{}]: {}", factory, XINCLUDE_FIXUP_BASE_URIS, e); } catch (@SuppressWarnings("ErrorNotRethrown") final AbstractMethodError err) { - LOGGER.warn("The DocumentBuilderFactory is out of date and does not support setFeature: {}", factory, err); + LOGGER.warn("The DocumentBuilderFactory [{}] is out of date and does not support setFeature: {}", factory, err); } try { factory.setFeature(XINCLUDE_FIXUP_LANGUAGE, true); } catch (final ParserConfigurationException e) { - LOGGER.warn("The DocumentBuilderFactory [{}] does not support the feature [{}].", factory, + LOGGER.warn("The DocumentBuilderFactory [{}] does not support the feature [{}]: {}", factory, XINCLUDE_FIXUP_LANGUAGE, e); } catch (@SuppressWarnings("ErrorNotRethrown") final AbstractMethodError err) { - LOGGER.warn("The DocumentBuilderFactory is out of date and does not support setFeature: {}", factory, err); + LOGGER.warn("The DocumentBuilderFactory [{}] is out of date and does not support setFeature: {}", factory, err); } } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/375d363f/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 2ee1931..9a8d97d 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -32,6 +32,9 @@ Specify the SocketAppender connect timeout value as part of the configuration. The new appender takes a new parameter connectTimeoutMillis. </action> + <action issue="LOG4J2-912" dev="ggregory" type="fix"> + XML configuration does not report full error message for XInclude parser configuration problems. + </action> <action issue="LOG4J2-903" dev="ggregory" type="fix" due-to="Mauro Molinari"> ClassLoaderContextSelector uses ClassLoader.toString() as a key </action>
