settings: Move development logs to var/log for development environment.

This updates all the paths in ZULIP_PATHS to store logs in the
zulip/var/log directory.
This commit is contained in:
Taranjeet Singh 2016-07-09 21:39:30 +05:30 committed by Tim Abbott
parent 03384deb86
commit f18f3f4c1a
1 changed files with 3 additions and 2 deletions

View File

@ -219,7 +219,8 @@ USE_TZ = True
DEPLOY_ROOT = os.path.join(os.path.realpath(os.path.dirname(__file__)), '..')
LOCALE_PATHS = (os.path.join(DEPLOY_ROOT, 'locale'),)
# this directory will be used to store logs for development environment
DEVELOPMENT_LOG_DIRECTORY = os.path.join(DEPLOY_ROOT, 'var', 'log')
# Make redirects work properly behind a reverse proxy
USE_X_FORWARDED_HOST = True
@ -801,7 +802,7 @@ else:
for (var, path) in ZULIP_PATHS:
if DEVELOPMENT:
# if DEVELOPMENT, store these files in the Zulip checkout
path = os.path.basename(path)
path = os.path.join(DEVELOPMENT_LOG_DIRECTORY, os.path.basename(path))
vars()[var] = path
ZULIP_WORKER_TEST_FILE = '/tmp/zulip-worker-test-file'