Add Logging file
This commit is contained in:
18
aquabot.py
18
aquabot.py
@@ -18,16 +18,16 @@ import asyncio
|
|||||||
import loadconfig
|
import loadconfig
|
||||||
|
|
||||||
# LOGGING
|
# LOGGING
|
||||||
#logger = logging.getLogger("discord")
|
logger = logging.getLogger("discord")
|
||||||
# https://docs.python.org/3/library/logging.html#levels
|
# https://docs.python.org/3/library/logging.html#levels
|
||||||
#logger.setLevel(logging.INFO)
|
logger.setLevel(logging.INFO)
|
||||||
#handler = logging.FileHandler(
|
handler = logging.FileHandler(
|
||||||
# filename="logs/discord.log",
|
filename="logs/discord.log",
|
||||||
# encoding="utf-8",
|
encoding="utf-8",
|
||||||
# mode="w")
|
mode="w")
|
||||||
#handler.setFormatter(
|
handler.setFormatter(
|
||||||
# logging.Formatter("%(asctime)s:%(levelname)s:%(name)s: %(message)s"))
|
logging.Formatter("%(asctime)s:%(levelname)s:%(name)s: %(message)s"))
|
||||||
#logger.addHandler(handler)
|
logger.addHandler(handler)
|
||||||
|
|
||||||
# INIT THE BOT
|
# INIT THE BOT
|
||||||
bot = commands.Bot(
|
bot = commands.Bot(
|
||||||
|
|||||||
Reference in New Issue
Block a user