feat: add proper logging

This commit is contained in:
2025-01-08 08:56:32 -05:00
parent d56bac1b2f
commit e3982c064d
6 changed files with 29 additions and 11 deletions

11
main.py
View File

@@ -1,7 +1,18 @@
import logging
import constants
import events
from state import client
if __name__ == "__main__":
logging.basicConfig(
format=(
"%(asctime)s %(levelname)s %(name):%(module)s %(message)s"
if __debug__
else "%(asctime)s %(levelname)s %(message)s"
),
datefmt="%Y-%m-%d %T",
level=logging.DEBUG if __debug__ else logging.INFO,
)
events.prepare()
client.run(constants.SECRETS["TOKEN"])