From 96f8777a8f9b337cf33ad7dd911bcf199f86d07c Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 11 Mar 2019 12:14:29 +0000 Subject: [PATCH] Show ip and port as "ip:port" in _handle logging --- modules/rest_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/rest_api.py b/modules/rest_api.py index 6fa0c4e1..bbedabbd 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -39,8 +39,8 @@ class Handler(http.server.BaseHTTPRequestHandler): return [key_setting, minify] def _handle(self, method): - _log.debug("[HTTP] starting _handle for %s from %s", - [method, self.client_address]) + _log.debug("[HTTP] starting _handle for %s from %s:%d", + [method, self.client_address[0], self.client_address[1]]) path, endpoint, args = self._path_data() headers = utils.CaseInsensitiveDict(dict(self.headers.items())) @@ -94,8 +94,8 @@ class Handler(http.server.BaseHTTPRequestHandler): self._respond(code, headers, response) - _log.debug("[HTTP] finishing _handle for %s from %s", - [method, self.client_address]) + _log.debug("[HTTP] finishing _handle for %s from %s:%d", + [method, self.client_address[0], self.client_address[1]]) def do_GET(self): self._handle("GET")