]> us-delaporte.pagekite.me Git - matrix-goal-bot.git/blobdiff - tasks.py
Logging during invoke
[matrix-goal-bot.git] / tasks.py
index c344190809ec877f770ad1773855bc03d87d6613..29d9f5b610a4ea3524ee13ec48fad8a743b382df 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -1,5 +1,11 @@
+import logging
+
 from invoke import Collection
 from matrix_goal_bot import tasks
 
+logging.basicConfig(filename='matrix-goal-bot.log', encoding='utf-8', level=logging.DEBUG)
+logging.getLogger('nio').setLevel(logging.WARNING)
+logging.getLogger('asyncio').setLevel(logging.WARNING)
+
 ns = Collection()
-ns.add_collection(tasks)
+ns.add_collection(tasks, 'goals')