feat: add proper logging
This commit is contained in:
11
main.py
11
main.py
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user