incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: incubator-altrmi/server/impl/src/java/org/apache/altrmi/server/impl LogEnabledServerMonitor.java
Date Thu, 27 May 2004 22:59:29 GMT
hammant     2004/05/27 15:59:29

  Modified:    server/impl/src/java/org/apache/altrmi/server/impl
                        LogEnabledServerMonitor.java
  Log:
  No longer dependant on missing AbstractLogger
  
  Revision  Changes    Path
  1.3       +19 -14    incubator-altrmi/server/impl/src/java/org/apache/altrmi/server/impl/LogEnabledServerMonitor.java
  
  Index: LogEnabledServerMonitor.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/server/impl/src/java/org/apache/altrmi/server/impl/LogEnabledServerMonitor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LogEnabledServerMonitor.java	8 Feb 2004 06:06:46 -0000	1.2
  +++ LogEnabledServerMonitor.java	27 May 2004 22:59:29 -0000	1.3
  @@ -18,8 +18,8 @@
   
   import org.apache.altrmi.server.ServerMonitor;
   import org.apache.altrmi.common.BadConnectionException;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.framework.logger.LogEnabled;
   
   import java.io.IOException;
   
  @@ -30,51 +30,56 @@
    * @author Paul Hammant
    * @version $Revision$
    */
  -public class LogEnabledServerMonitor extends AbstractLogEnabled implements ServerMonitor
  +public class LogEnabledServerMonitor implements LogEnabled, ServerMonitor
   {
  +    private Logger logger;
  +
  +    public void enableLogging(Logger logger) {
  +        this.logger = logger;
  +    }
   
       public LogEnabledServerMonitor(Logger logger)
       {
  -        super.enableLogging(logger);
  +        enableLogging(logger);
       }
   
       public void closeError(Class clazz, String s, IOException e)
       {
  -        if (getLogger().isDebugEnabled())
  +        if (logger.isDebugEnabled())
           {
  -            getLogger().debug("<closeError> " + s, e);
  +            logger.debug("<closeError> " + s, e);
           }
       }
   
       public void badConnection(Class clazz, String s, BadConnectionException bce)
       {
  -        if (getLogger().isDebugEnabled())
  +        if (logger.isDebugEnabled())
           {
  -            getLogger().debug("<badConnection> " + s, bce);
  +            logger.debug("<badConnection> " + s, bce);
           }
       }
   
       public void classNotFound(Class clazz, ClassNotFoundException e)
       {
  -        if (getLogger().isDebugEnabled())
  +        if (logger.isDebugEnabled())
           {
  -            getLogger().debug("<classNotFound> ", e);
  +            logger.debug("<classNotFound> ", e);
           }
       }
   
       public void unexpectedException(Class clazz, String s, Exception e)
       {
  -        if (getLogger().isDebugEnabled())
  +        if (logger.isDebugEnabled())
           {
  -            getLogger().debug("<unexpectedException> " + s, e);
  +            logger.debug("<unexpectedException> " + s, e);
           }
       }
   
       public void stopServerError(Class clazz, String s, Exception e)
       {
  -        if (getLogger().isErrorEnabled())
  +        if (logger.isErrorEnabled())
           {
  -            getLogger().error("<badConnection> " + s, e);
  +            logger.error("<badConnection> " + s, e);
           }
       }
   
  
  
  

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


Mime
View raw message