Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e0646a5d6 | ||
|
|
270d7df9ae |
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "dpy_logger"
|
||||
version = "1.0.0"
|
||||
version = "1.1.0"
|
||||
description = "Leveled Discord channel logger for discord.py — config-free, injectable, installable."
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
|
||||
@@ -213,8 +213,11 @@ class DPYLogger:
|
||||
content=content,
|
||||
embed=self.build_embed(level, action, actor, log_msg),
|
||||
)
|
||||
except Exception:
|
||||
_log.exception(f"[dpy_logger] failed to send {level} log: {log_msg}")
|
||||
except Exception as exc:
|
||||
# WARNING, not ERROR: the record was already mirrored to the stdlib sink BEFORE the
|
||||
# send (see _emit_stdlib above), so a swallowed discord-send failure is recovered
|
||||
# cleanly - the log survives, only the channel mirror was lost. lazy interpolation.
|
||||
_log.warning("[dpy_logger] failed to send %s log: %s (%s)", level, log_msg, exc)
|
||||
return None
|
||||
|
||||
async def debug(self, log, action=None, actor=None, guild=None, log_to_file=None):
|
||||
|
||||
Reference in New Issue
Block a user