changed the logging a bit.
This commit is contained in:
parent
abadc6be04
commit
0180755b1f
1 changed files with 7 additions and 4 deletions
11
pybot-f.py
11
pybot-f.py
|
@ -9,11 +9,14 @@ from discord.ext import commands
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
logger = logging.getLogger('discord')
|
|
||||||
logger.setLevel(logging.INFO)
|
|
||||||
handler = logging.FileHandler(filename='bot.log', encoding='utf-8', mode='w')
|
handler = logging.FileHandler(filename='bot.log', encoding='utf-8', mode='w')
|
||||||
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
|
discord.utils.setup_logging(handler=handler)
|
||||||
logger.addHandler(handler)
|
|
||||||
|
# logger = logging.getLogger('discord')
|
||||||
|
# logger.setLevel(logging.INFO)
|
||||||
|
# handler = logging.FileHandler(filename='bot.log', encoding='utf-8', mode='w')
|
||||||
|
# handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
|
||||||
|
# logger.addHandler(handler)
|
||||||
|
|
||||||
# The bots' description
|
# The bots' description
|
||||||
description = '''Testing this bot stuff :)'''
|
description = '''Testing this bot stuff :)'''
|
||||||
|
|
Loading…
Add table
Reference in a new issue