diff options
| author | Pierre Ossman <ossman@cendio.se> | 2019-04-25 10:05:14 +0200 |
|---|---|---|
| committer | Pierre Ossman <ossman@cendio.se> | 2019-04-25 10:05:14 +0200 |
| commit | be9823bf938a9ebce65572941651973dbaa366f8 (patch) | |
| tree | 095f075988fe0b484bbe755e0589230d9db5592a | |
| parent | e4658ada2e2e179cdb8f6362dbb7c5e3ce3ff717 (diff) | |
| download | websockify-be9823bf938a9ebce65572941651973dbaa366f8.tar.gz | |
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.
| -rw-r--r-- | websockify/websockifyserver.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/websockify/websockifyserver.py b/websockify/websockifyserver.py index 0ec3bb0..c801725 100644 --- a/websockify/websockifyserver.py +++ b/websockify/websockifyserver.py @@ -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 |
