From 9f95446a55533c8cdceec7c4430be5cad752ecb1 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Tue, 25 Apr 2017 18:00:12 +0200 Subject: [bug] unify logging style using class attr I changed most of the logger statements to use a class attribute, in this way it's easier to identify which class it's logging them. in some cases I leave a module-level logger, when we're either using functions or when the module it's too small. at the same time I did a general review and cleanup of the logging statements. --- src/leap/bitmask/core/web/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/core/web/api.py') diff --git a/src/leap/bitmask/core/web/api.py b/src/leap/bitmask/core/web/api.py index 01c65bae..7f871711 100644 --- a/src/leap/bitmask/core/web/api.py +++ b/src/leap/bitmask/core/web/api.py @@ -40,7 +40,8 @@ class Api(Resource): d = self.dispatcher.dispatch(command) d.addCallback(self._write_response, request) - d.addErrback(log.error) + d.addErrback( + lambda f: log.error('Error on POST: {0!r}'.format(f))) return NOT_DONE_YET def _write_response(self, response, request): -- cgit v1.2.3