]> apps.delaporte.us Git - matrix-goal-bot.git/blobdiff - matrix_goal_bot/bot.py
Improve debugging
[matrix-goal-bot.git] / matrix_goal_bot / bot.py
index dce0f73c895130c99a3aad6c82310557cefee205..4046eeb39221f92bd56535eaf7e0e7be8ab96d2d 100644 (file)
@@ -42,8 +42,6 @@ def today():
     return dt.now().strftime(DATE_FORMAT)
 
 logger = logging.getLogger(__name__)
     return dt.now().strftime(DATE_FORMAT)
 
 logger = logging.getLogger(__name__)
-logging.basicConfig(filename='matrix-goal-bot.log', encoding='utf-8', level=logging.DEBUG)
-logging.getLogger('nio').setLevel(logging.WARNING)
 
 snark = [
     'Ye cannot get ye flask.',
 
 snark = [
     'Ye cannot get ye flask.',
@@ -69,9 +67,11 @@ class GoalBot():
         self.data = Data(db_file)
 
     def run(self):
         self.data = Data(db_file)
 
     def run(self):
+        logger.debug('Running goal bot...')
         self.bot.run()
 
     async def handle_message(self, room, message):
         self.bot.run()
 
     async def handle_message(self, room, message):
+        logger.debug(f'Message: {message}')
         match = botlib.MessageMatch(room, message, self.bot, self.prefix)
 
         if not match.is_not_from_this_bot() and match.prefix():
         match = botlib.MessageMatch(room, message, self.bot, self.prefix)
 
         if not match.is_not_from_this_bot() and match.prefix():