Few fixes:
- if no log4j.properties is found, we'll construct a 'sane' config ( to be consistent with the other loggers ). The appender must have a name ( otherwise the JMX stuff in log4j will complain ) - fix the class name for the log4j factory git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138886 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/Attic/Log4JCategoryLog.java,v 1.4 2002/05/06 21:32:37 costin Exp $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2002/05/06 21:32:37 $
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/Attic/Log4JCategoryLog.java,v 1.5 2002/06/06 22:09:09 costin Exp $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2002/06/06 22:09:09 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
@@ -75,7 +75,7 @@ import java.util.Enumeration;
|
||||
* @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
|
||||
* @author Rod Waldhoff
|
||||
* @author Robert Burrell Donkin
|
||||
* @version $Id: Log4JCategoryLog.java,v 1.4 2002/05/06 21:32:37 costin Exp $
|
||||
* @version $Id: Log4JCategoryLog.java,v 1.5 2002/06/06 22:09:09 costin Exp $
|
||||
*/
|
||||
public final class Log4JCategoryLog implements Log {
|
||||
|
||||
@@ -122,6 +122,7 @@ public final class Log4JCategoryLog implements Log {
|
||||
// commons-logging patterns ).
|
||||
ConsoleAppender app=new ConsoleAppender(new PatternLayout( LAYOUT ),
|
||||
ConsoleAppender.SYSTEM_ERR );
|
||||
app.setName("stderr");
|
||||
|
||||
root.addAppender( app );
|
||||
root.setPriority( Priority.INFO );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v 1.7 2002/03/31 00:31:49 craigmcc Exp $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2002/03/31 00:31:49 $
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v 1.8 2002/06/06 22:09:09 costin Exp $
|
||||
* $Revision: 1.8 $
|
||||
* $Date: 2002/06/06 22:09:09 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
@@ -104,7 +104,7 @@ import org.apache.commons.logging.LogSource;
|
||||
*
|
||||
* @author Rod Waldhoff
|
||||
* @author Craig R. McClanahan
|
||||
* @version $Revision: 1.7 $ $Date: 2002/03/31 00:31:49 $
|
||||
* @version $Revision: 1.8 $ $Date: 2002/06/06 22:09:09 $
|
||||
*/
|
||||
|
||||
public class LogFactoryImpl extends LogFactory {
|
||||
@@ -425,7 +425,8 @@ public class LogFactoryImpl extends LogFactory {
|
||||
return (logConstructor);
|
||||
} catch (Throwable t) {
|
||||
throw new LogConfigurationException
|
||||
("No suitable Log constructor", t);
|
||||
("No suitable Log constructor " +
|
||||
logConstructorSignature+ " for " + logClassName, t);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -448,7 +449,7 @@ public class LogFactoryImpl extends LogFactory {
|
||||
if( isLog4JAvailable() ) {
|
||||
try {
|
||||
Class proxyClass=
|
||||
loadClass( "org.apache.commons.logging.Log4jFactory" );
|
||||
loadClass( "org.apache.commons.logging.impl.Log4jFactory" );
|
||||
proxyFactory=(LogFactory)proxyClass.newInstance();
|
||||
} catch( Throwable t ) {
|
||||
proxyFactory=null;
|
||||
|
||||
Reference in New Issue
Block a user