From e9695d0e2df79d668823e2f466fb706aebaba0ea Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Fri, 22 Mar 2024 12:58:55 -0700 Subject: [PATCH] Work around eventlet/eventlet#807 The WSGI server logs every HTTP response at level INFO, which is inappropriately verbose. As a workaround, disable response logging at application log levels above DEBUG. --- changedetectionio/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index a8132267..2d89e240 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -182,15 +182,19 @@ def main(): s_type = socket.AF_INET6 if ipv6_enabled else socket.AF_INET + wsgi_enable_access_log = logger_level in { 'TRACE', 'DEBUG' } + if ssl_mode: # @todo finalise SSL config, but this should get you in the right direction if you need it. eventlet.wsgi.server(eventlet.wrap_ssl(eventlet.listen((host, port), s_type), log=logger, + log_output=wsgi_enable_access_log, certfile='cert.pem', keyfile='privkey.pem', server_side=True), app) else: eventlet.wsgi.server(eventlet.listen((host, int(port)), s_type), app, - log=logger) + log=logger, + log_output=wsgi_enable_access_log)