Added logging
This commit is contained in:
parent
8f74565abd
commit
aad869cd5f
1 changed files with 7 additions and 0 deletions
7
main.py
7
main.py
|
@ -1,6 +1,13 @@
|
|||
#!/usr/bin/env python3
|
||||
from discord.ext import commands
|
||||
import utils.data as data
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger('discord')
|
||||
logger.setLevel(logging.INFO)
|
||||
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
|
||||
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
|
||||
logger.addHandler(handler)
|
||||
|
||||
CONFIG = data.load_json("config")
|
||||
|
||||
|
|
Loading…
Reference in a new issue