From c8eba064959310e44bdc2a4f0df49a534e761d04 Mon Sep 17 00:00:00 2001 From: drebs Date: Thu, 13 Oct 2016 12:08:46 -0300 Subject: [bug] use twisted.logger and fix logging namespace --- src/leap/bitmask/mail/imap/account.py | 3 +-- src/leap/bitmask/mail/incoming/service.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/leap/bitmask/mail') diff --git a/src/leap/bitmask/mail/imap/account.py b/src/leap/bitmask/mail/imap/account.py index 8ee0cbfa..63d214e4 100644 --- a/src/leap/bitmask/mail/imap/account.py +++ b/src/leap/bitmask/mail/imap/account.py @@ -24,7 +24,6 @@ from functools import partial from twisted.internet import defer from twisted.logger import Logger from twisted.mail import imap4 -from twisted.logger import Logger from zope.interface import implements from leap.common.check import leap_assert, leap_assert_type @@ -40,7 +39,7 @@ PROFILE_CMD = os.environ.get('LEAP_PROFILE_IMAPCMD', False) if PROFILE_CMD: def _debugProfiling(result, cmdname, start): took = (time.time() - start) * 1000 - log.msg("CMD " + cmdname + " TOOK: " + str(took) + " msec") + logger.debug("CMD " + cmdname + " TOOK: " + str(took) + " msec") return result diff --git a/src/leap/bitmask/mail/incoming/service.py b/src/leap/bitmask/mail/incoming/service.py index ddbdd2a3..38a2290f 100644 --- a/src/leap/bitmask/mail/incoming/service.py +++ b/src/leap/bitmask/mail/incoming/service.py @@ -49,7 +49,7 @@ from leap.soledad.common.crypto import ENC_SCHEME_KEY, ENC_JSON_KEY from leap.soledad.common.errors import InvalidAuthTokenError -logger = Logger(__name__) +logger = Logger() MULTIPART_ENCRYPTED = "multipart/encrypted" MULTIPART_SIGNED = "multipart/signed" -- cgit v1.2.3