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/socketfactory FtpSocketFactory.java
Date Thu, 06 Oct 2005 06:11:12 GMT
rana_b      2005/10/05 23:11:12

  Modified:    src/java/org/apache/ftpserver/socketfactory
                        FtpSocketFactory.java
  Log:
  commons-logging used
  
  Revision  Changes    Path
  1.3       +12 -11    incubator-ftpserver/src/java/org/apache/ftpserver/socketfactory/FtpSocketFactory.java
  
  Index: FtpSocketFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/socketfactory/FtpSocketFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FtpSocketFactory.java	4 Oct 2005 07:28:02 -0000	1.2
  +++ FtpSocketFactory.java	6 Oct 2005 06:11:12 -0000	1.3
  @@ -16,15 +16,16 @@
    */
   package org.apache.ftpserver.socketfactory;
   
  +import java.net.InetAddress;
  +import java.net.ServerSocket;
  +
  +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.Logger;
   import org.apache.ftpserver.interfaces.ISocketFactory;
   import org.apache.ftpserver.interfaces.ISsl;
   
  -import java.net.InetAddress;
  -import java.net.ServerSocket;
  -
   
   /**
    * It creates standard FTP server socket.
  @@ -34,17 +35,18 @@
   public 
   class FtpSocketFactory implements ISocketFactory {
       
  -    private Logger m_logger;
  +    private Log m_log;
       
       private InetAddress m_serverAddress;
       private int m_port;
       private ISsl m_ssl;
       
  +    
       /**
  -     * Set logger
  +     * Set the log factory.
        */
  -    public void setLogger(Logger logger) {
  -        m_logger = logger;
  +    public void setLogFactory(LogFactory factory) {
  +        m_log = factory.getInstance(getClass());
       }
       
       /**
  @@ -66,7 +68,6 @@
               Configuration sslConf = conf.getConfiguration("ssl", null);
               if(sslConf != null) {
                   m_ssl = (ISsl)Class.forName("org.apache.ftpserver.ssl.Ssl").newInstance();
  -                m_ssl.setLogger(m_logger);
                   m_ssl.configure(sslConf);
               }
           }
  @@ -74,7 +75,7 @@
               throw ex;
           }
           catch(Exception ex) {
  -            m_logger.error("FtpSocketFactory.configure()", ex);
  +            m_log.fatal("FtpSocketFactory.configure()", ex);
               throw new FtpException("FtpSocketFactory.configure()", ex);
           }
       }
  
  
  

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


Mime
View raw message