From b31ab5cef02c7f3e24844f03fc9b73e65c7ecc8f Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sat, 30 Nov 2024 16:39:17 +0000 Subject: [PATCH] Don't call logging directly, use a logger --- bot/utils/decorators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/utils/decorators.py b/bot/utils/decorators.py index df09e13..87fa5d4 100644 --- a/bot/utils/decorators.py +++ b/bot/utils/decorators.py @@ -111,12 +111,12 @@ def in_month(*allowed_months: Month) -> Callable: def decorator(callable_: Callable) -> Callable: # Functions decorated as commands are turned into instances of `Command` if isinstance(callable_, Command): - logging.debug(f"Command {callable_.qualified_name} will be locked to {human_months(allowed_months)}") + log.debug(f"Command {callable_.qualified_name} will be locked to {human_months(allowed_months)}") actual_deco = in_month_command(*allowed_months) # D.py will assign this attribute when `callable_` is registered as a listener elif hasattr(callable_, "__cog_listener__"): - logging.debug(f"Listener {callable_.__qualname__} will be locked to {human_months(allowed_months)}") + log.debug(f"Listener {callable_.__qualname__} will be locked to {human_months(allowed_months)}") actual_deco = in_month_listener(*allowed_months) # Otherwise we're unsure exactly what has been decorated