Author: carnold
Date: Wed Aug 22 15:39:21 2007
New Revision: 568761
URL: http://svn.apache.org/viewvc?rev=568761&view=rev
Log:
Bug 32527: Default initialization with XML file halts program if JAXP not
available
Modified:
logging/log4j/trunk/src/changes/changes.xml
logging/log4j/trunk/src/main/java/org/apache/log4j/LogManager.java
Modified: logging/log4j/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/logging/log4j/trunk/src/changes/changes.xml?rev=568761&r1=568760&r2=568761&view=diff
==============================================================================
--- logging/log4j/trunk/src/changes/changes.xml (original)
+++ logging/log4j/trunk/src/changes/changes.xml Wed Aug 22 15:39:21 2007
@@ -22,7 +22,8 @@
<body>
<release version="1.2.15" date="2007-06-27" description="SyslogAppender
enhancements, NTEventLogAppender and Maven build.">
- <action action="add" issue="17531">Add reset option to
PropertyConfigurator and DOMConfigurator.</action>
+ <action action="fix" issue="32527">Default initialization with XML file
halts program if JAXP not available.</action>
+ <action action="add" issue="17531">Add reset option to
PropertyConfigurator and DOMConfigurator.</action>
<action action="fix" issue="14350">Error message always logged to
LogLog when calling close on TelnetAppender.</action>
<action action="add" issue="32572">Add configurable triggeringPolicy
for SMTPAppender.</action>
<action action="fix" issue="43181">NullPointerException in MDC on
Tomcat reload.</action>
Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/LogManager.java
URL:
http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/LogManager.java?rev=568761&r1=568760&r2=568761&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/LogManager.java
(original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/LogManager.java Wed Aug
22 15:39:21 2007
@@ -119,11 +119,15 @@
// configuration to the OptionConverter.selectAndConfigure
// method.
if(url != null) {
- LogLog.debug("Using URL ["+url+"] for automatic log4j configuration.");
- OptionConverter.selectAndConfigure(url, configuratorClassName,
+ LogLog.debug("Using URL ["+url+"] for automatic log4j
configuration.");
+ try {
+ OptionConverter.selectAndConfigure(url, configuratorClassName,
LogManager.getLoggerRepository());
+ } catch (NoClassDefFoundError e) {
+ LogLog.warn("Error during default initialization", e);
+ }
} else {
- LogLog.debug("Could not find resource: ["+configurationOptionStr+"].");
+ LogLog.debug("Could not find resource:
["+configurationOptionStr+"].");
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]