Commit b8217e45 authored by Denis Bilenko's avatar Denis Bilenko

pywsgi: log the exception to the server log rather than to stderr

parent 38d651e3
...@@ -251,7 +251,7 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler): ...@@ -251,7 +251,7 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
except Exception: except Exception:
self.status = _INTERNAL_ERROR_STATUS self.status = _INTERNAL_ERROR_STATUS
self.close_connection = 1 self.close_connection = 1
traceback.print_exc() self.server.log_message(traceback.format_exc())
if not self.response_length: if not self.response_length:
self.wfile.write(INTERNAL_ERROR_RESPONSE) self.wfile.write(INTERNAL_ERROR_RESPONSE)
finally: finally:
......
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