From 69706eaabe6e60d4a4c2c6208818b09417fc54f2 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 19 Aug 2023 13:32:19 +0200 Subject: [PATCH] `s/logger/_logger/` in the `plugins` module. The `logger` name may clash with the context of an action, where `logger` may have been set to something else. --- platypush/plugins/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/__init__.py b/platypush/plugins/__init__.py index a66a7e34e..b0090f60b 100644 --- a/platypush/plugins/__init__.py +++ b/platypush/plugins/__init__.py @@ -15,7 +15,7 @@ from platypush.message.response import Response from platypush.utils import get_decorators, get_plugin_name_by_class PLUGIN_STOP_TIMEOUT = 5 # Plugin stop timeout in seconds -logger = logging.getLogger(__name__) +_logger = logging.getLogger(__name__) def action(f: Callable[..., Any]) -> Callable[..., Response]: @@ -33,7 +33,7 @@ def action(f: Callable[..., Any]) -> Callable[..., Response]: try: result = f(*args, **kwargs) except TypeError as e: - logger.exception(e) + _logger.exception(e) result = Response(errors=[str(e)]) if result and isinstance(result, Response):