mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 13:34:40 +00:00
f73fd703b7
Intermediate commits (oldest → newest): - Merge branch 'main' of https://github.com/migatu/conjurer - Merge branch 'main' of https://github.com/migatu/conjurer - BGFX - Function for idv3 and bugfix - Merge branch 'main' of https://github.com/migatu/conjurer - Logs additional - LGFIX - FIXED! - Arguments added to the utility. - Fix old bug - add exception handling - Literowka - Hej hoppsan! - Add comment - Fixc Fixc - Fixit - Inside joke very boomer much wow - Fixing logging issues in music_functions.py and other_functions.py - Maybe this will fix - test - test - another attempt to fix the bug - Maybe this is the fix ? - Maybe fix
21 lines
498 B
Python
21 lines
498 B
Python
import logging
|
|
from logging import handlers
|
|
|
|
logger = logging.getLogger("discord")
|
|
logger.setLevel(logging.DEBUG)
|
|
handler = handlers.RotatingFileHandler(
|
|
filename="test.log",
|
|
encoding="utf-8",
|
|
mode="a",
|
|
maxBytes=6 * 1024 * 1024,
|
|
backupCount=6,
|
|
)
|
|
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
|
handler.setFormatter(formatter)
|
|
logger.addHandler(handler)
|
|
|
|
|
|
logger2 = logging.getLogger("discord")
|
|
for item in logger2.handlers:
|
|
print(item)
|