Compare commits
3
Commits
87835e59b9
...
v1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e0646a5d6 | ||
|
|
270d7df9ae | ||
|
|
d21de01ada |
@@ -10,18 +10,18 @@ live from `bot.settings` so it can change at runtime via a command.
|
|||||||
`requirements.txt`:
|
`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:
|
Direct:
|
||||||
|
|
||||||
```bash
|
```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).
|
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
|
## Usage
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "dpy_logger"
|
name = "dpy_logger"
|
||||||
version = "0.1.7"
|
version = "1.1.0"
|
||||||
description = "Leveled Discord channel logger for discord.py — config-free, injectable, installable."
|
description = "Leveled Discord channel logger for discord.py — config-free, injectable, installable."
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|||||||
@@ -213,8 +213,11 @@ class DPYLogger:
|
|||||||
content=content,
|
content=content,
|
||||||
embed=self.build_embed(level, action, actor, log_msg),
|
embed=self.build_embed(level, action, actor, log_msg),
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
_log.exception(f"[dpy_logger] failed to send {level} log: {log_msg}")
|
# 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
|
return None
|
||||||
|
|
||||||
async def debug(self, log, action=None, actor=None, guild=None, log_to_file=None):
|
async def debug(self, log, action=None, actor=None, guild=None, log_to_file=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user