set log handler on root logger

This commit is contained in:
Infinidoge 2024-12-20 01:13:02 -05:00
parent e87d562abb
commit f447ddfd79
Signed by: Infinidoge
SSH key fingerprint: SHA256:GT2StvPQMMfFHyiiFJymQxfTG/z6EWLJ6NWItf5K5sA

View file

@ -26,8 +26,7 @@ log.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s:%(levelname)s:%(name)s: %(message)s")
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(formatter)
logger_disnake.addHandler(handler)
log.addHandler(handler)
logging.getLogger(None).addHandler(handler)
if load_dotenv(find_dotenv(usecwd=True)):
log.debug("Loaded .env")