Transfer gevent errors to log file
Transfer warnings from warnings module to logfile (#2394)
This commit is contained in:
parent
fbac3e38ac
commit
8a6a8dcbe8
@ -159,6 +159,7 @@ def setup(log_file, log_level=None):
|
||||
r.removeHandler(h)
|
||||
h.close()
|
||||
r.addHandler(file_handler)
|
||||
logging.captureWarnings(True)
|
||||
return "" if log_file == DEFAULT_LOG_FILE else log_file
|
||||
|
||||
|
||||
|
@ -204,6 +204,7 @@ class WebServer(object):
|
||||
output = _readable_listen_address(self.listen_address, self.listen_port)
|
||||
log.info('Starting Gevent server on %s', output)
|
||||
self.wsgiserver = WSGIServer(sock, self.app, log=self.access_logger, handler_class=MyWSGIHandler,
|
||||
error_log=log,
|
||||
spawn=Pool(), **ssl_args)
|
||||
if ssl_args:
|
||||
wrap_socket = self.wsgiserver.wrap_socket
|
||||
|
Loading…
Reference in New Issue
Block a user