avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosu...@apache.org
Subject cvs commit: avalon/framework/impl/src/java/org/apache/avalon/framework/logger LogKit2AvalonLoggerAdapter.java
Date Mon, 02 Feb 2004 17:04:08 GMT
leosutic    2004/02/02 09:04:08

  Modified:    framework/impl/src/java/org/apache/avalon/framework/logger
                        LogKit2AvalonLoggerAdapter.java
  Log:
  Applied patches for bug 26521
  
  Revision  Changes    Path
  1.10      +25 -4     avalon/framework/impl/src/java/org/apache/avalon/framework/logger/LogKit2AvalonLoggerAdapter.java
  
  Index: LogKit2AvalonLoggerAdapter.java
  ===================================================================
  RCS file: /home/cvs/avalon/framework/impl/src/java/org/apache/avalon/framework/logger/LogKit2AvalonLoggerAdapter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- LogKit2AvalonLoggerAdapter.java	26 Jan 2004 19:50:33 -0000	1.9
  +++ LogKit2AvalonLoggerAdapter.java	2 Feb 2004 17:04:08 -0000	1.10
  @@ -36,7 +36,7 @@
        * The Avalon Logger that we re-route to.
        */
       private final Logger m_logger;
  -
  +    
       /**
        * Create a Logkit {@link org.apache.log.Logger} instance that
        * redirects to an Avalon {@link org.apache.avalon.framework.logger.Logger} instance.
  @@ -51,9 +51,30 @@
           final LogKit2AvalonLoggerAdapter target =
               new LogKit2AvalonLoggerAdapter( logger );
           logKitLogger.setLogTargets( new LogTarget[ ] { target } );
  +        
  +        if ( logger.isDebugEnabled() )
  +        {
  +            logKitLogger.setPriority( Priority.DEBUG );
  +        }
  +        else if ( logger.isInfoEnabled() )
  +        {
  +            logKitLogger.setPriority( Priority.INFO );
  +        }
  +        else if ( logger.isWarnEnabled() )
  +        {
  +            logKitLogger.setPriority( Priority.WARN );
  +        }
  +        else if ( logger.isErrorEnabled() )
  +        {
  +            logKitLogger.setPriority( Priority.ERROR );
  +        }
  +        else if ( logger.isFatalErrorEnabled() )
  +        {
  +            logKitLogger.setPriority( Priority.FATAL_ERROR );
  +        }
           return logKitLogger;
       }
  -
  +    
       /**
        * Constructor for an Adaptor. Adapts to
        * specified Avalon Logger.
  @@ -68,7 +89,7 @@
           }
           m_logger = logger;
       }
  -
  +    
       /**
        * Route a LogKit message to an avalon Logger.
        *
  
  
  

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


Mime
View raw message