Remove default logging, show request path in our own _handle logging

This commit is contained in:
jesopo 2019-03-11 12:16:56 +00:00
parent 96f8777a8f
commit 9026f722c1

View file

@ -39,10 +39,11 @@ class Handler(http.server.BaseHTTPRequestHandler):
return [key_setting, minify] return [key_setting, minify]
def _handle(self, method): def _handle(self, method):
_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() path, endpoint, args = self._path_data()
_log.debug("[HTTP] starting _handle for %s from %s:%d: %s",
[method, self.client_address[0], self.client_address[1], path])
headers = utils.CaseInsensitiveDict(dict(self.headers.items())) headers = utils.CaseInsensitiveDict(dict(self.headers.items()))
params = self._url_params() params = self._url_params()
data = self._body() data = self._body()
@ -104,7 +105,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
self._handle("POST") self._handle("POST")
def log_message(self, format, *args): def log_message(self, format, *args):
_log.debug("[HTTP] " + format, args) return
@utils.export("botset", {"setting": "rest-api", @utils.export("botset", {"setting": "rest-api",
"help": "Enable/disable REST API", "help": "Enable/disable REST API",