From 2d472ad05c7fb2a5fe405be46af2062cdb5eaeee Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Wed, 9 Feb 2022 01:25:33 +0800 Subject: Fixed #33495 -- Improved debug logging message about adapting handlers for middlewares. It's the wrapped handler that's adapted to the wrapping middleware. --- django/core/handlers/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'django/core') diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py index 0f341a5328..caee168cbf 100644 --- a/django/core/handlers/base.py +++ b/django/core/handlers/base.py @@ -125,11 +125,11 @@ class BaseHandler: if is_async: if not method_is_async: if debug: - logger.debug("Synchronous %s adapted.", name) + logger.debug("Synchronous handler adapted for %s.", name) return sync_to_async(method, thread_sensitive=True) elif method_is_async: if debug: - logger.debug("Asynchronous %s adapted.", name) + logger.debug("Asynchronous handler adapted for %s.", name) return async_to_sync(method) return method -- cgit v1.3