avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon/src/java/org/apache/avalon/framework/logger Log4JLogger.java
Date Mon, 03 Feb 2003 21:36:10 GMT
bloritsch    2003/02/03 13:36:10

  Modified:    .        build.xml
               src/java/org/apache/avalon/framework/logger Log4JLogger.java
  Log:
  update Avalon to use current release of Log4J
  
  Revision  Changes    Path
  1.157     +2 -2      jakarta-avalon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/build.xml,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- build.xml	29 Jan 2003 22:00:31 -0000	1.156
  +++ build.xml	3 Feb 2003 21:36:09 -0000	1.157
  @@ -79,7 +79,7 @@
       <property name="xalan.jar" value="${tools.dir}/lib/xalan-2.3.1.jar"/>
       <property name="bsf.jar" value="${tools.dir}/lib/bsf.jar"/>
       <property name="junit.jar" value="${tools.dir}/lib/junit-3.7.jar"/>
  -    <property name="log4j.jar" value="${tools.dir}/lib/log4j-1.1.3.jar"/>
  +    <property name="log4j.jar" value="${tools.dir}/lib/log4j-1.2.7.jar"/>
   
       <property name="announce2txt" value="${tools.dir}/announcement2txt.xsl"/>
       <property name="announce2header" value="${tools.dir}/announcement2header.xsl"/>
  @@ -129,7 +129,7 @@
   
       <!-- Set up dist properties -->
       <target name="setup-properties" >
  -        <available property="log4j.present" classname="org.apache.log4j.Category">
  +        <available property="log4j.present" classname="org.apache.log4j.Logger">
               <classpath refid="project.class.path"/>
           </available>
           <available property="jdk14.present" classname="java.util.logging.Logger">
  
  
  
  1.13      +7 -8      jakarta-avalon/src/java/org/apache/avalon/framework/logger/Log4JLogger.java
  
  Index: Log4JLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/framework/logger/Log4JLogger.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Log4JLogger.java	23 Nov 2002 08:58:59 -0000	1.12
  +++ Log4JLogger.java	3 Feb 2003 21:36:10 -0000	1.13
  @@ -54,8 +54,7 @@
    */
   package org.apache.avalon.framework.logger;
   
  -import org.apache.log4j.Category;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   
   /**
    * The default Log4J wrapper class for Logger.
  @@ -66,14 +65,14 @@
       implements Logger
   {
       //underlying implementation
  -    private final Category m_logger;
  +    private final org.apache.log4j.Logger m_logger;
   
       /**
        * Create a logger that delegates to specified category.
        *
        * @param logImpl the category to delegate to
        */
  -    public Log4JLogger( final Category logImpl )
  +    public Log4JLogger( final org.apache.log4j.Logger logImpl )
       {
           m_logger = logImpl;
       }
  @@ -168,7 +167,7 @@
        */
       public final boolean isWarnEnabled()
       {
  -        return m_logger.isEnabledFor( Priority.WARN );
  +        return m_logger.isEnabledFor( Level.WARN );
       }
   
       /**
  @@ -199,7 +198,7 @@
        */
       public final boolean isErrorEnabled()
       {
  -        return m_logger.isEnabledFor( Priority.ERROR );
  +        return m_logger.isEnabledFor( Level.ERROR );
       }
   
       /**
  @@ -230,7 +229,7 @@
        */
       public final boolean isFatalErrorEnabled()
       {
  -        return m_logger.isEnabledFor( Priority.FATAL );
  +        return m_logger.isEnabledFor( Level.FATAL );
       }
   
       /**
  @@ -243,6 +242,6 @@
        */
       public final Logger getChildLogger( final String name )
       {
  -        return new Log4JLogger( Category.getInstance( m_logger.getName() + "." + name )
);
  +        return new Log4JLogger( org.apache.log4j.Logger.getLogger( m_logger.getName() +
"." + name ) );
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-cvs-help@jakarta.apache.org


Mime
View raw message