Skip to content

Commit

Permalink
Don't call logging directly, use a logger
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering committed Nov 30, 2024
1 parent d81a65e commit b31ab5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b31ab5c

Please sign in to comment.