From 1a63825ba64562937419d4dc2c15ba9694520a22 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Sun, 10 Mar 2024 09:51:00 +0100 Subject: [PATCH] removed the switch if the accesslog is not configured --- .../src/gunicorn_logging_extension/__init__.py | 2 +- .../src/gunicorn_logging_extension/aiohttp.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gunicorn-logging-extension/src/gunicorn_logging_extension/__init__.py b/gunicorn-logging-extension/src/gunicorn_logging_extension/__init__.py index 4b520e5..038406f 100644 --- a/gunicorn-logging-extension/src/gunicorn_logging_extension/__init__.py +++ b/gunicorn-logging-extension/src/gunicorn_logging_extension/__init__.py @@ -11,7 +11,7 @@ from logging.config import dictConfig, fileConfig from gunicorn.glogging import CONFIG_DEFAULTS from gunicorn.glogging import Logger as gLogger -__version__ = "0.0.9" +__version__ = "0.0.10" CONFIG_DEFAULTS = { diff --git a/gunicorn-logging-extension/src/gunicorn_logging_extension/aiohttp.py b/gunicorn-logging-extension/src/gunicorn_logging_extension/aiohttp.py index a5df0ad..ea89e0d 100644 --- a/gunicorn-logging-extension/src/gunicorn_logging_extension/aiohttp.py +++ b/gunicorn-logging-extension/src/gunicorn_logging_extension/aiohttp.py @@ -65,12 +65,11 @@ class ExtendedGunicornWebWorker(GunicornWebWorker): ) if runner is None: - access_log = self.log.access_log if self.cfg.accesslog else None runner = web.AppRunner( app, logger=self.log, keepalive_timeout=self.cfg.keepalive, - access_log=access_log, + access_log=self.log.access_log, access_log_class=self.access_log_class, shutdown_timeout=self.cfg.graceful_timeout / 100 * 95, )