Skip to content

Commit b31ab5c

Browse files
committed
Don't call logging directly, use a logger
1 parent d81a65e commit b31ab5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bot/utils/decorators.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ def in_month(*allowed_months: Month) -> Callable:
111111
def decorator(callable_: Callable) -> Callable:
112112
# Functions decorated as commands are turned into instances of `Command`
113113
if isinstance(callable_, Command):
114-
logging.debug(f"Command {callable_.qualified_name} will be locked to {human_months(allowed_months)}")
114+
log.debug(f"Command {callable_.qualified_name} will be locked to {human_months(allowed_months)}")
115115
actual_deco = in_month_command(*allowed_months)
116116

117117
# D.py will assign this attribute when `callable_` is registered as a listener
118118
elif hasattr(callable_, "__cog_listener__"):
119-
logging.debug(f"Listener {callable_.__qualname__} will be locked to {human_months(allowed_months)}")
119+
log.debug(f"Listener {callable_.__qualname__} will be locked to {human_months(allowed_months)}")
120120
actual_deco = in_month_listener(*allowed_months)
121121

122122
# Otherwise we're unsure exactly what has been decorated

0 commit comments

Comments
 (0)