Improved test for log4j availability. Patch from issue #31597
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@139051 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -63,7 +63,7 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
* @author Rod Waldhoff
|
* @author Rod Waldhoff
|
||||||
* @author Craig R. McClanahan
|
* @author Craig R. McClanahan
|
||||||
* @author Richard A. Sitze
|
* @author Richard A. Sitze
|
||||||
* @version $Revision: 1.33 $ $Date: 2004/03/06 21:52:59 $
|
* @version $Revision: 1.34 $ $Date: 2004/10/17 09:02:48 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class LogFactoryImpl extends LogFactory {
|
public class LogFactoryImpl extends LogFactory {
|
||||||
@@ -502,8 +502,8 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
protected boolean isLog4JAvailable() {
|
protected boolean isLog4JAvailable() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loadClass("org.apache.log4j.Logger");
|
loadClass("org.apache.commons.logging.impl.Log4JLogger").getClassLoader()
|
||||||
loadClass("org.apache.commons.logging.impl.Log4JLogger");
|
.loadClass("org.apache.log4j.Logger" );
|
||||||
return (true);
|
return (true);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
return (false);
|
return (false);
|
||||||
|
|||||||
Reference in New Issue
Block a user