Ejemplo n.º 1
0
    def _log_start(self):
        if (not logging.getLogger('pyftpdlib').handlers and not
                logging.root.handlers):
            # If we get to this point it means the user hasn't
            # configured any logger. We want logging to be on
            # by default (stderr).
            from pyftpdlib.ioloop import _config_logging
            _config_logging()

        if self.handler.passive_ports:
            pasv_ports = "%s->%s" % (self.handler.passive_ports[0],
                                     self.handler.passive_ports[-1])
        else:
            pasv_ports = None
        addr = self.address
        if hasattr(self.handler, 'ssl_protocol'):
            proto = "FTP+SSL"
        else:
            proto = "FTP"
        logger.info(">>> starting %s server on %s:%s, pid=%i <<<"
                    % (proto, addr[0], addr[1], os.getpid()))
        logger.info("poller: %r", self.ioloop.__class__)
        logger.info("masquerade (NAT) address: %s",
                    self.handler.masquerade_address)
        logger.info("passive ports: %s", pasv_ports)
        if os.name == 'posix':
            logger.info("use sendfile(2): %s", self.handler.use_sendfile)
Ejemplo n.º 2
0
    def _log_start(self):
        if (not logging.getLogger('pyftpdlib').handlers
                and not logging.root.handlers):
            # If we get to this point it means the user hasn't
            # configured any logger. We want logging to be on
            # by default (stderr).
            from pyftpdlib.ioloop import _config_logging
            _config_logging()

        if self.handler.passive_ports:
            pasv_ports = "%s->%s" % (self.handler.passive_ports[0],
                                     self.handler.passive_ports[-1])
        else:
            pasv_ports = None
        addr = self.address
        if hasattr(self.handler, 'ssl_protocol'):
            proto = "FTP+SSL"
        else:
            proto = "FTP"
        logger.info(">>> starting %s server on %s:%s, pid=%i <<<" %
                    (proto, addr[0], addr[1], os.getpid()))
        logger.info("poller: %r", self.ioloop.__class__)
        logger.info("masquerade (NAT) address: %s",
                    self.handler.masquerade_address)
        logger.info("passive ports: %s", pasv_ports)
        if os.name == 'posix':
            logger.info("use sendfile(2): %s", self.handler.use_sendfile)
Ejemplo n.º 3
0
    def _log_start(self):
        if not logging.getLogger().handlers:
            # If we get to this point it means the user hasn't
            # configured logger. We want to log by default so
            # we configure logging ourselves so that it will
            # print to stderr.
            from pyftpdlib.ioloop import _config_logging

            _config_logging()

        if self.handler.passive_ports:
            pasv_ports = "%s->%s" % (self.handler.passive_ports[0], self.handler.passive_ports[-1])
        else:
            pasv_ports = None
        logger.info(">>> starting FTP server on %s:%s <<<" % self.address)
        logger.info("poller: %r", self.ioloop.__class__)
        logger.info("masquerade (NAT) address: %s", self.handler.masquerade_address)
        logger.info("passive ports: %s", pasv_ports)
        if os.name == "posix":
            logger.info("use sendfile(2): %s", self.handler.use_sendfile)
Ejemplo n.º 4
0
    def _log_start(self):
        if not logging.getLogger().handlers:
            # If we get to this point it means the user hasn't
            # configured logger. We want to log by default so
            # we configure logging ourselves so that it will
            # print to stderr.
            from pyftpdlib.ioloop import _config_logging
            _config_logging()

        if self.handler.passive_ports:
            pasv_ports = "%s->%s" % (self.handler.passive_ports[0],
                                     self.handler.passive_ports[-1])
        else:
            pasv_ports = None
        logger.info(">>> starting FTP server on %s:%s <<<" % self.address)
        logger.info("poller: %r", self.ioloop.__class__)
        logger.info("masquerade (NAT) address: %s",
                    self.handler.masquerade_address)
        logger.info("passive ports: %s", pasv_ports)
        if os.name == 'posix':
            logger.info("use sendfile(2): %s", self.handler.use_sendfile)