summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/mail
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/services/mail')
-rw-r--r--src/leap/bitmask/services/mail/conductor.py5
-rw-r--r--src/leap/bitmask/services/mail/imap.py4
-rw-r--r--src/leap/bitmask/services/mail/imapcontroller.py6
-rw-r--r--src/leap/bitmask/services/mail/plumber.py4
-rw-r--r--src/leap/bitmask/services/mail/smtpbootstrapper.py4
-rw-r--r--src/leap/bitmask/services/mail/smtpconfig.py4
6 files changed, 12 insertions, 15 deletions
diff --git a/src/leap/bitmask/services/mail/conductor.py b/src/leap/bitmask/services/mail/conductor.py
index 2f1d20e6..68197d9d 100644
--- a/src/leap/bitmask/services/mail/conductor.py
+++ b/src/leap/bitmask/services/mail/conductor.py
@@ -17,9 +17,8 @@
"""
Mail Services Conductor
"""
-import logging
-
from leap.bitmask.config import flags
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.gui import statemachines
from leap.bitmask.services.mail import connection as mail_connection
from leap.bitmask.services.mail.emailfirewall import get_email_firewall
@@ -28,7 +27,7 @@ from leap.common.events import catalog
from leap.common.events import register as leap_register
-logger = logging.getLogger(__name__)
+logger = get_logger()
class IMAPControl(object):
diff --git a/src/leap/bitmask/services/mail/imap.py b/src/leap/bitmask/services/mail/imap.py
index 30646a63..5934756d 100644
--- a/src/leap/bitmask/services/mail/imap.py
+++ b/src/leap/bitmask/services/mail/imap.py
@@ -17,16 +17,16 @@
"""
Initialization of imap service
"""
-import logging
import os
import sys
+from leap.bitmask.logs.utils import get_logger
from leap.mail.constants import INBOX_NAME
from leap.mail.imap.service import imap
from leap.mail.incoming.service import IncomingMail, INCOMING_CHECK_PERIOD
from twisted.python import log
-logger = logging.getLogger(__name__)
+logger = get_logger()
# The name of the environment variable that has to be
# set to override the default time value, in seconds.
diff --git a/src/leap/bitmask/services/mail/imapcontroller.py b/src/leap/bitmask/services/mail/imapcontroller.py
index d374ac29..e5313477 100644
--- a/src/leap/bitmask/services/mail/imapcontroller.py
+++ b/src/leap/bitmask/services/mail/imapcontroller.py
@@ -17,12 +17,10 @@
"""
IMAP service controller.
"""
-import logging
-
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.services.mail import imap
-
-logger = logging.getLogger(__name__)
+logger = get_logger()
class IMAPController(object):
diff --git a/src/leap/bitmask/services/mail/plumber.py b/src/leap/bitmask/services/mail/plumber.py
index 58625db5..43203f0c 100644
--- a/src/leap/bitmask/services/mail/plumber.py
+++ b/src/leap/bitmask/services/mail/plumber.py
@@ -30,6 +30,7 @@ from twisted.internet import defer
from leap.bitmask.backend.settings import Settings
from leap.bitmask.config.providerconfig import ProviderConfig
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.provider import get_provider_path
from leap.bitmask.services.soledad.soledadbootstrapper import get_db_paths
from leap.bitmask.util import flatten, get_path_prefix
@@ -37,8 +38,7 @@ from leap.bitmask.util import flatten, get_path_prefix
from leap.mail.imap.account import IMAPAccount
from leap.soledad.client import Soledad
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.DEBUG)
+logger = get_logger()
def initialize_soledad(uuid, email, passwd,
diff --git a/src/leap/bitmask/services/mail/smtpbootstrapper.py b/src/leap/bitmask/services/mail/smtpbootstrapper.py
index 6f45469b..cd871803 100644
--- a/src/leap/bitmask/services/mail/smtpbootstrapper.py
+++ b/src/leap/bitmask/services/mail/smtpbootstrapper.py
@@ -17,11 +17,11 @@
"""
SMTP bootstrapping
"""
-import logging
import os
from leap.bitmask.config.providerconfig import ProviderConfig
from leap.bitmask.crypto.certs import download_client_cert
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.services import download_service_config
from leap.bitmask.services.abstractbootstrapper import AbstractBootstrapper
from leap.bitmask.services.mail.smtpconfig import SMTPConfig
@@ -31,7 +31,7 @@ from leap.common import certs as leap_certs
from leap.common.check import leap_assert
from leap.common.files import check_and_fix_urw_only
-logger = logging.getLogger(__name__)
+logger = get_logger()
class NoSMTPHosts(Exception):
diff --git a/src/leap/bitmask/services/mail/smtpconfig.py b/src/leap/bitmask/services/mail/smtpconfig.py
index 09f90314..2d8de411 100644
--- a/src/leap/bitmask/services/mail/smtpconfig.py
+++ b/src/leap/bitmask/services/mail/smtpconfig.py
@@ -17,16 +17,16 @@
"""
SMTP configuration
"""
-import logging
import os
from leap.bitmask.config.providerconfig import ProviderConfig
+from leap.bitmask.logs.utils import get_logger
from leap.bitmask.services import ServiceConfig
from leap.bitmask.services.mail.smtpspec import get_schema
from leap.bitmask.util import get_path_prefix
from leap.common.check import leap_assert, leap_assert_type
-logger = logging.getLogger(__name__)
+logger = get_logger()
class SMTPConfig(ServiceConfig):