3 Commits
Author SHA1 Message Date
dsql 0e0646a5d6 chore: bump to 1.1.0 (logging-discipline audit)
Signed-off-by: disqualifier <dev@disqualifier.me>
2026-08-10 23:00:50 -04:00
dsql 270d7df9ae fix: discord send failure logs WARNING, not ERROR (D4)
_send mirrors the record to the stdlib sink BEFORE attempting the discord send, so a
swallowed send failure is recovered cleanly - the log survives, only the channel mirror
was lost. that is a WARNING (recovered), not an ERROR. demote from _log.exception (ERROR +
traceback) to _log.warning with the reason folded in lazily; the traceback belonged on a
terminal/unhandled path, and this one recovers via the guaranteed stdlib record.

Signed-off-by: disqualifier <dev@disqualifier.me>
2026-08-09 02:14:11 -04:00
dsql d21de01ada release: 1.0.0
first stable release. pre-1.0.0 verification complete: all surviving MED regressions and
gaps resolved and independently re-fired, tree audited clean across the suite.

Signed-off-by: disqualifier <dev@disqualifier.me>
2026-07-09 18:53:15 -04:00
3 changed files with 9 additions and 6 deletions
+3 -3
View File
@@ -10,18 +10,18 @@ live from `bot.settings` so it can change at runtime via a command.
`requirements.txt`:
```
dpy_logger @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_logger.git@v0.1.7
dpy_logger @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_logger.git@v1.0.0
```
Direct:
```bash
pip install "dpy_logger @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_logger.git@v0.1.7"
pip install "dpy_logger @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_logger.git@v1.0.0"
```
Requires `discord.py` (pulled transitively).
Drop the `@v0.1.7` suffix from the line above to install the latest unpinned.
Drop the `@v1.0.0` suffix from the line above to install the latest unpinned.
## Usage
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "dpy_logger"
version = "0.1.7"
version = "1.1.0"
description = "Leveled Discord channel logger for discord.py — config-free, injectable, installable."
requires-python = ">=3.10"
dependencies = [
+5 -2
View File
@@ -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):