Allow to enable d.py debug logging through env var (#6657)

This commit is contained in:
Jakub Kuczys
2026-02-19 02:25:39 +01:00
committed by GitHub
parent 5023f7f1b5
commit 9afbe363e5

View File

@@ -1,6 +1,7 @@
import argparse
import logging
import logging.handlers
import os
import pathlib
import re
import sys
@@ -286,7 +287,7 @@ def init_logging(level: int, location: pathlib.Path, cli_flags: argparse.Namespa
root_logger.setLevel(level)
# DEBUG logging for discord.py is a bit too ridiculous :)
dpy_logger = logging.getLogger("discord")
dpy_logger.setLevel(logging.INFO)
dpy_logger.setLevel(logging.DEBUG if os.getenv("RED_DPY_DEBUG") == "1" else logging.INFO)
rich_console = rich.get_console()
rich.reconfigure(tab_size=4)