incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: incubator-ftpserver/src/java/org/apache/ftpserver ConnectionManagerImpl.java
Date Thu, 06 Oct 2005 05:55:19 GMT
rana_b      2005/10/05 22:55:19

  Modified:    src/java/org/apache/ftpserver ConnectionManagerImpl.java
  Log:
  commons-logging used
  
  Revision  Changes    Path
  1.4       +10 -8     incubator-ftpserver/src/java/org/apache/ftpserver/ConnectionManagerImpl.java
  
  Index: ConnectionManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/ConnectionManagerImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConnectionManagerImpl.java	4 Oct 2005 07:28:02 -0000	1.3
  +++ ConnectionManagerImpl.java	6 Oct 2005 05:55:19 -0000	1.4
  @@ -23,10 +23,11 @@
   import java.util.TimerTask;
   import java.util.Vector;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.apache.ftpserver.ftplet.Configuration;
   import org.apache.ftpserver.ftplet.FtpException;
   import org.apache.ftpserver.ftplet.FtpRequest;
  -import org.apache.ftpserver.ftplet.Logger;
   import org.apache.ftpserver.interfaces.ConnectionManagerObserver;
   import org.apache.ftpserver.interfaces.IConnection;
   import org.apache.ftpserver.interfaces.IConnectionManager;
  @@ -40,6 +41,8 @@
   public 
   class ConnectionManagerImpl implements IConnectionManager {
   
  +    private Log m_log;
  +    
       private ConnectionManagerObserver m_observer;              
       private Timer m_timer;
       private Vector m_conList = new Vector();  
  @@ -52,13 +55,12 @@
       private int m_defaultIdleSec;
       private int m_pollIntervalSec;
       
  -    private Logger m_logger;
       
       /**
  -     * Set logger object.
  +     * Set the log factory.
        */
  -    public void setLogger(Logger logger) {
  -        m_logger = logger;
  +    public void setLogFactory(LogFactory factory) {
  +        m_log = factory.getInstance(getClass());
       }
       
       /**
  @@ -267,7 +269,7 @@
                       
                       // idle data connectin timeout - close it 
                       if( (currTime - requestTime) > idleTimeMillis ) {
  -                        m_logger.info("Removing idle data connection for " + request.getUser());
  +                        m_log.info("Removing idle data connection for " + request.getUser());
                           dataCon.closeDataSocket();
                       }
                   }
  @@ -286,7 +288,7 @@
                   continue;
               }
               
  -            m_logger.info("Removing idle user " + request.getUser());
  +            m_log.info("Removing idle user " + request.getUser());
               closeConnection(connection);
           }
       }
  
  
  

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


Mime
View raw message