diff options
| author | 2020-03-28 16:33:20 +0100 | |
|---|---|---|
| committer | 2020-03-28 16:35:36 +0100 | |
| commit | 5feabe642ed5b685c7aa9515bc70ff4ff8b278bc (patch) | |
| tree | 34643f1aad8fbd19f045bcaeffda897d58661599 /bot/exts/pride/pride_avatar.py | |
| parent | Merge master: sentry sdk, updated contributing docs (diff) | |
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.
Diffstat (limited to 'bot/exts/pride/pride_avatar.py')
| -rw-r--r-- | bot/exts/pride/pride_avatar.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/bot/exts/pride/pride_avatar.py b/bot/exts/pride/pride_avatar.py index 85e49d5c..3f9878e3 100644 --- a/bot/exts/pride/pride_avatar.py +++ b/bot/exts/pride/pride_avatar.py @@ -142,4 +142,3 @@ class PrideAvatar(commands.Cog): def setup(bot: commands.Bot) -> None: """Cog load.""" bot.add_cog(PrideAvatar(bot)) - log.info("PrideAvatar cog loaded") |