From 5feabe642ed5b685c7aa9515bc70ff4ff8b278bc Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sat, 28 Mar 2020 16:33:20 +0100 Subject: Deseasonify: log in `add_cog` rather than in each `setup` The previous system required each extension's `setup` func to log that the cog was loaded. This leads to inconsistent messages all trying to convey the same thing, variable logger names in the output file are difficult to read, and several extensions were not logging at all. By logging directly in the `add_cog` method, we reduce code repetition, ensure consistent format, and remove the responsibility to remember that a log should be made. --- bot/exts/easter/egghead_quiz.py | 1 - 1 file changed, 1 deletion(-) (limited to 'bot/exts/easter/egghead_quiz.py') diff --git a/bot/exts/easter/egghead_quiz.py b/bot/exts/easter/egghead_quiz.py index bd179fe2..0498d9db 100644 --- a/bot/exts/easter/egghead_quiz.py +++ b/bot/exts/easter/egghead_quiz.py @@ -117,4 +117,3 @@ class EggheadQuiz(commands.Cog): def setup(bot: commands.Bot) -> None: """Egghead Quiz Cog load.""" bot.add_cog(EggheadQuiz(bot)) - log.info("EggheadQuiz bot loaded") -- cgit v1.2.3