Skip to content
Snippets Groups Projects
Commit bf2db35a authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

test-static-http: flush access log per request

It appears that stderr is fully buffered on Windows.

# no-check-commit because of log_message() function
parent 3423f7e2
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,12 @@
else:
simplehttpserver = httpserver.httpserver
class _httprequesthandler(httpserver.simplehttprequesthandler):
def log_message(self, format, *args):
httpserver.simplehttprequesthandler.log_message(self, format, *args)
sys.stderr.flush()
class simplehttpservice(object):
def __init__(self, host, port):
self.address = (host, port)
def init(self):
......@@ -29,9 +34,8 @@
class simplehttpservice(object):
def __init__(self, host, port):
self.address = (host, port)
def init(self):
self.httpd = simplehttpserver(
self.address, httpserver.simplehttprequesthandler)
self.httpd = simplehttpserver(self.address, _httprequesthandler)
def run(self):
self.httpd.serve_forever()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment