def __init__(self, host, port, app):
        from wsgiref.simple_server import make_server, WSGIServer, \
                WSGIRequestHandler
        self.host = host
        self.port = port

        class DevServer(WSGIServer):
            timeout = 0.2


        class RequestHandler(WSGIRequestHandler):

            def address_string(slf):
                # getfqdn sometimes is very slow
                return '{}:{}'.format(host, port)

            def log_message(self, format, *args):
                logger.info("%s - - [%s] %s",
                            self.client_address[0],
                            self.log_date_time_string(),
                            format % args)

        try:
            self.port = int(port)
        except ValueError:
            raise ValueError(
                'Please provide valid port value insted of "{}"'.format(port))
        self.running = True
        self.server = make_server(self.host, self.port, app, server_class=DevServer,
                                  handler_class=RequestHandler)
        super(DevServerThread, self).__init__()
dataset/ETHPy150Open SmartTeleMax/iktomi/iktomi/cli/app.py/DevServerThread.__init__/original