summaryrefslogtreecommitdiff
path: root/client/brain.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-10-01 13:47:23 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-10-01 13:47:23 +0200
commit2bcceb3fe037355dbdfdc46ffbd036c7f719a7bf (patch)
treea95bc434d4d6cc26e3539de31bc7f1e335ae6a1c /client/brain.py
parent4c62c3c39d9c050c98b18c5d88c736fbb2554992 (diff)
parent63f4a7c006d54c68a534f0910ed1cb601ed32edb (diff)
downloadjasper-client-2bcceb3fe037355dbdfdc46ffbd036c7f719a7bf.tar.gz
jasper-client-2bcceb3fe037355dbdfdc46ffbd036c7f719a7bf.zip
Merge pull request #201 from Holzhaus/add-more-logging
Add more logging
Diffstat (limited to 'client/brain.py')
-rw-r--r--client/brain.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/brain.py b/client/brain.py
index 6daa366..d905853 100644
--- a/client/brain.py
+++ b/client/brain.py
@@ -61,13 +61,15 @@ class Brain(object):
"""
for module in self.modules:
for text in texts:
-
if module.isValid(text):
+ self._logger.debug("'%s' is a valid phrase for module '%s'", text, module.__name__)
try:
module.handle(text, self.mic, self.profile)
- return
except:
self._logger.error('Failed to execute module', exc_info=True)
- self.mic.say(
- "I'm sorry. I had some trouble with that operation. Please try again later.")
+ self.mic.say("I'm sorry. I had some trouble with that operation. Please try again later.")
+ else:
+ self._logger.debug("Handling of phrase '%s' by module '%s' completed", text, module.__name__)
+ finally:
return
+ self._logger.debug("No module was able to handle any of these phrases: %r", texts)