From e4496521e9eef9eb6a0cf5123ce05dba11264b7f Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 25 Sep 2013 14:42:57 -0400 Subject: [PATCH] Update logging path for email-mirror. (imported from commit 75f36dbb963b2b77ecda7ba138023f0f774047e0) --- zerver/management/commands/email-mirror.py | 3 +-- zproject/settings.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) 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,