Use client IP in logs, not host

This is the more common behaviour, and it is also more reliable as
it may require some time to look up hostnames and they may change
over time.
This commit is contained in:
Pierre Ossman 2019-04-25 10:05:14 +02:00
parent e4658ada2e
commit be9823bf93
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class WebSockifyRequestHandler(WebSocketRequestHandlerMixIn, SimpleHTTPRequestHa
SimpleHTTPRequestHandler.__init__(self, req, addr, server)
def log_message(self, format, *args):
self.logger.info("%s - - [%s] %s" % (self.address_string(), self.log_date_time_string(), format % args))
self.logger.info("%s - - [%s] %s" % (self.client_address[0], self.log_date_time_string(), format % args))
#
# WebSocketRequestHandler logging/output functions