You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by co...@apache.org on 2002/06/07 00:09:09 UTC

cvs commit: jakarta-commons/logging/src/java/org/apache/commons/logging/impl Log4JCategoryLog.java LogFactoryImpl.java

costin      2002/06/06 15:09:09

  Modified:    logging/src/java/org/apache/commons/logging/impl
                        Log4JCategoryLog.java LogFactoryImpl.java
  Log:
  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
  
  Revision  Changes    Path
  1.5       +5 -4      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Log4JCategoryLog.java
  
  Index: Log4JCategoryLog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Log4JCategoryLog.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Log4JCategoryLog.java	6 May 2002 21:32:37 -0000	1.4
  +++ Log4JCategoryLog.java	6 Jun 2002 22:09:09 -0000	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/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/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/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 @@
    * @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 @@
               // commons-logging patterns ).
               ConsoleAppender app=new ConsoleAppender(new PatternLayout( LAYOUT ),
                                                       ConsoleAppender.SYSTEM_ERR );
  +            app.setName("stderr");
               
               root.addAppender( app );
               root.setPriority( Priority.INFO );
  
  
  
  1.8       +7 -6      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
  
  Index: LogFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- LogFactoryImpl.java	31 Mar 2002 00:31:49 -0000	1.7
  +++ LogFactoryImpl.java	6 Jun 2002 22:09:09 -0000	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /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/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 @@
    *
    * @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 @@
               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 @@
           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;
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>