add log.py and imports in cog-files to that. Part of #26

This commit is contained in:
2021-08-11 15:09:57 +02:00
parent 74dba52afb
commit 6e5d8261ff
9 changed files with 64 additions and 53 deletions

View File

@@ -1,16 +1,13 @@
import discord
from discord.ext import commands
import logging
import log
e = discord.Embed()
# setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('jeeves')
logger.setLevel(logging.INFO)
handler = logging.FileHandler(filename='jeeves.log', encoding='utf-8', mode='a')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
logger.addHandler(handler)
logger = log.get_logger(__name__)
e = discord.Embed()
class Links(commands.Cog):
@@ -34,6 +31,7 @@ class Links(commands.Cog):
async def on_ready(self):
print('##### LINKS module active')
def setup(bot):
bot.add_cog(Links(bot))