diff --git a/zerver/management/commands/email-mirror.py b/zerver/management/commands/email-mirror.py index 9c19bde10b..70da883873 100755 --- a/zerver/management/commands/email-mirror.py +++ b/zerver/management/commands/email-mirror.py @@ -46,12 +46,11 @@ PORT = 993 ## Setup ## -log_file = "/var/log/humbug/email-mirror.log" log_format = "%(asctime)s: %(message)s" logging.basicConfig(format=log_format) formatter = logging.Formatter(log_format) -file_handler = logging.FileHandler(log_file) +file_handler = logging.FileHandler(settings.EMAIL_LOG_PATH) file_handler.setFormatter(formatter) logger = logging.getLogger(__name__) diff --git a/zproject/settings.py b/zproject/settings.py index 210308eb58..b6fe8cfebf 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -452,12 +452,14 @@ if DEPLOYED: ERROR_LOG_DIR = '/home/humbug/logs/errors' STATS_DIR = '/home/humbug/stats' PERSISTENT_QUEUE_FILENAME = "/home/humbug/tornado/event_queues.pickle" + EMAIL_LOG_PATH = "/var/log/zulip/email-mirror.log" else: EVENT_LOG_DIR = 'event_log' SERVER_LOG_PATH = "server.log" ERROR_LOG_DIR = 'errors' STATS_DIR = 'stats' PERSISTENT_QUEUE_FILENAME = "event_queues.pickle" + EMAIL_LOG_PATH = "email-mirror.log" LOGGING = { 'version': 1,