Commit 34611101 authored by Denis Bilenko's avatar Denis Bilenko

wsgi: allow passing log=None to disable access logs

parent 02a2ac29
...@@ -142,13 +142,13 @@ class WSGIServer(HTTPServer): ...@@ -142,13 +142,13 @@ class WSGIServer(HTTPServer):
'wsgi.run_once': False} 'wsgi.run_once': False}
# If 'wsgi.errors' is not present in base_env, it will be set to sys.stderr # If 'wsgi.errors' is not present in base_env, it will be set to sys.stderr
def __init__(self, listener, application=None, backlog=None, spawn='default', log=None, handler_class=None, environ=None): def __init__(self, listener, application=None, backlog=None, spawn='default', log='default', handler_class=None, environ=None):
HTTPServer.__init__(self, listener, backlog=backlog, spawn=spawn) HTTPServer.__init__(self, listener, backlog=backlog, spawn=spawn)
if application is not None: if application is not None:
self.application = application self.application = application
if handler_class is not None: if handler_class is not None:
self.handler_class = handler_class self.handler_class = handler_class
if log is None: if log == 'default':
self.log = sys.stderr self.log = sys.stderr
else: else:
self.log = log self.log = log
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment