diff options
| author | 2020-06-20 12:28:18 +0200 | |
|---|---|---|
| committer | 2020-06-20 12:44:28 +0200 | |
| commit | 20b27f32c68673b603a6e6e41859f7672b6e0133 (patch) | |
| tree | 70c17f3e0f865f3a2fc9e9eb32ef7b9c516186cd | |
| parent | Incidents: remove redundant `exc_info` passing (diff) | |
Incidents: make logs contain the message id they pertain to
Suggested by Mark during review.
Co-authored-by: MarkKoz <[email protected]>
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/moderation/incidents.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/cogs/moderation/incidents.py b/bot/cogs/moderation/incidents.py index 5f4291953..33c3bee51 100644 --- a/bot/cogs/moderation/incidents.py +++ b/bot/cogs/moderation/incidents.py @@ -129,11 +129,11 @@ class Incidents(Cog): async for message in incidents.history(limit=limit): if not is_incident(message): - log.trace("Skipping message: not an incident") + log.trace(f"Skipping message {message.id}: not an incident") continue if has_signals(message): - log.trace("Skipping message: already has all signals") + log.trace(f"Skipping message {message.id}: already has all signals") continue await add_signals(message) @@ -172,7 +172,7 @@ class Incidents(Cog): await message.add_reaction(outcome.value) except Exception: - log.exception("Failed to archive incident to #incidents-archive") + log.exception(f"Failed to archive incident {incident.id} to #incidents-archive") return False else: @@ -274,7 +274,7 @@ class Incidents(Cog): except discord.NotFound: log.trace("Message doesn't exist, it was likely already relayed") except Exception: - log.exception("Failed to fetch message!") + log.exception(f"Failed to fetch message {message_id}!") else: log.trace("Message fetched successfully!") return message |