From 8ba650488ea1f1a50b4c22758f647c9f2ee7839d Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 20 Dec 2013 13:44:53 -0400 Subject: mail logs --- src/leap/bitmask/services/mail/imap.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/leap/bitmask/services/mail') diff --git a/src/leap/bitmask/services/mail/imap.py b/src/leap/bitmask/services/mail/imap.py index 2667f156..5db18cb9 100644 --- a/src/leap/bitmask/services/mail/imap.py +++ b/src/leap/bitmask/services/mail/imap.py @@ -19,10 +19,10 @@ Initialization of imap service """ import logging import os -#import sys +import sys from leap.mail.imap.service import imap -#from twisted.python import log +from twisted.python import log logger = logging.getLogger(__name__) @@ -58,15 +58,15 @@ def start_imap_service(*args, **kwargs): :returns: twisted.internet.task.LoopingCall instance """ + from leap.bitmask.config import flags logger.debug('Launching imap service') override_period = get_mail_check_period() if override_period: kwargs['check_period'] = override_period - # Uncomment the next two lines to get a separate debugging log - # TODO handle this by a separate flag. - #log.startLogging(open('/tmp/leap-imap.log', 'w')) - #log.startLogging(sys.stdout) + if flags.MAIL_LOGFILE: + log.startLogging(open(flags.MAIL_LOGFILE, 'w')) + log.startLogging(sys.stdout) return imap.run_service(*args, **kwargs) -- cgit v1.2.3