avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger Log4JLoggerManager.java LogKitLoggerManager.java
Date Thu, 22 Aug 2002 01:20:07 GMT
colus       2002/08/21 18:20:07

  Modified:    logger/src/java/org/apache/avalon/excalibur/logger
                        Log4JLoggerManager.java LogKitLoggerManager.java
  Log:
  *LoggerManagers implement LogEnable interface.
  
  Revision  Changes    Path
  1.4       +14 -3     jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/Log4JLoggerManager.java
  
  Index: Log4JLoggerManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/Log4JLoggerManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Log4JLoggerManager.java	7 Aug 2002 13:36:59 -0000	1.3
  +++ Log4JLoggerManager.java	22 Aug 2002 01:20:07 -0000	1.4
  @@ -52,6 +52,7 @@
   import java.util.HashMap;
   import java.util.Map;
   import org.apache.avalon.framework.logger.Log4JLogger;
  +import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.log4j.Category;
   import org.apache.log4j.Hierarchy;
  @@ -66,7 +67,7 @@
    * @since 4.1
    */
   public class Log4JLoggerManager
  -    implements LoggerManager
  +    implements LoggerManager, LogEnabled
   {
       /** Map for name to logger mapping */
       final private Map m_loggers = new HashMap();
  @@ -81,7 +82,7 @@
       final private Logger m_defaultLogger;
   
       /** The logger used to log output from the logger manager. */
  -    final private Logger m_logger;
  +    private Logger m_logger;
   
       /**
        * Creates a new <code>DefaultLog4JManager</code>. It will use a new <code>Hierarchy</code>.
  @@ -138,6 +139,16 @@
           m_prefix = prefix;
           m_hierarchy = hierarchy;
           m_defaultLogger = defaultLogger;
  +        m_logger = logger;
  +    }
  +
  +    /**
  +     * Provide a logger.
  +     *
  +     * @param logger the logger
  +     **/
  +    public void enableLogging( final Logger logger )
  +    {
           m_logger = logger;
       }
   
  
  
  
  1.6       +13 -3     jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/LogKitLoggerManager.java
  
  Index: LogKitLoggerManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/LogKitLoggerManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LogKitLoggerManager.java	7 Aug 2002 13:36:59 -0000	1.5
  +++ LogKitLoggerManager.java	22 Aug 2002 01:20:07 -0000	1.6
  @@ -74,7 +74,7 @@
    * @since 4.0
    */
   public class LogKitLoggerManager
  -    implements LoggerManager, Contextualizable, Configurable
  +    implements LoggerManager, LogEnabled, Contextualizable, Configurable
   {
       /** Map for name to logger mapping */
       final private Map m_loggers = new HashMap();
  @@ -92,7 +92,7 @@
       final private Logger m_defaultLogger;
   
       /** The logger used to log output from the logger manager. */
  -    final private Logger m_logger;
  +    private Logger m_logger;
   
       /**
        * Creates a new <code>DefaultLogKitManager</code>. It will use a new <code>Hierarchy</code>.
  @@ -149,6 +149,16 @@
           m_prefix = prefix;
           m_hierarchy = hierarchy;
           m_defaultLogger = defaultLogger;
  +        m_logger = logger;
  +    }
  +
  +    /**
  +     * Provide a logger.
  +     *
  +     * @param logger the logger
  +     **/
  +    public void enableLogging( final Logger logger )
  +    {
           m_logger = logger;
       }
   
  
  
  

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


Mime
View raw message