From 33132246e620e16fbaf47db2312bf7fc1283a232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Mon, 13 Jan 2025 09:53:45 +0100 Subject: [PATCH] fix: default stream handler import --- canaille/app/logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/canaille/app/logging.py b/canaille/app/logging.py index 08f34d92..d916a6a4 100644 --- a/canaille/app/logging.py +++ b/canaille/app/logging.py @@ -5,6 +5,7 @@ from flask import has_request_context from flask import request from flask.logging import default_handler +from flask.logging import wsgi_errors_stream class IPFilter(logging.Filter): @@ -70,7 +71,7 @@ def setup_logging(app): formatter = logging.Formatter( "[%(asctime)s] - %(ip)s - %(levelname)s in %(module)s: %(message)s" ) - handler = logging.StreamHandler(stream="ext://flask.logging.wsgi_errors_stream") + handler = logging.StreamHandler(stream=wsgi_errors_stream) handler.setFormatter(formatter) app.logger.setLevel(log_level) app.logger.removeHandler(default_handler)