diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-10-05 12:28:14 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-10-07 10:22:36 -0400 |
commit | 99b53c1714d302d7f0884e03b5c102081c483504 (patch) | |
tree | 82ac74e776a330338bf94563273aa4d33f578877 /src/leap/bitmask/core/dispatcher.py | |
parent | 4a471fb8b434d3df07c5de42fc41590b5d9fc5f5 (diff) |
[refactor] use new logger infrastructure
Diffstat (limited to 'src/leap/bitmask/core/dispatcher.py')
-rw-r--r-- | src/leap/bitmask/core/dispatcher.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index 5b7b836..6a5603e 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -25,7 +25,8 @@ except ImportError: from queue import Queue from twisted.internet import defer -from twisted.python import failure, log +from twisted.python import failure +from twisted.logger import Logger from leap.common.events import register_async as register from leap.common.events import unregister_async as unregister @@ -34,6 +35,9 @@ from leap.common.events import catalog from .api import APICommand, register_method +logger = Logger() + + class SubCommand(object): __metaclass__ = APICommand @@ -461,5 +465,6 @@ def _format_result(result): def _format_error(failure): - log.err(failure) + # TODO --- should check if the failure has the 'expected' attribute set + logger.failure('[DISPATCHER] Uncatched error:') return json.dumps({'error': failure.value.message, 'result': None}) |