summaryrefslogtreecommitdiff
path: root/example_project/settings.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-10-25 10:38:53 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-10-25 10:38:53 +0100
commitf1a1cc8c8ccd489b8d8830002fa58fdf0ef28275 (patch)
tree451aeccf75f3cfcd84f05df973ea08c7a45e0a32 /example_project/settings.py
parentfd90c3bfc1b06a807f5e3e9e3cddec1689ac378e (diff)
downloadIshtar-f1a1cc8c8ccd489b8d8830002fa58fdf0ef28275.tar.bz2
Ishtar-f1a1cc8c8ccd489b8d8830002fa58fdf0ef28275.zip
Fix default log file path for multiple instances
Diffstat (limited to 'example_project/settings.py')
-rw-r--r--example_project/settings.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/example_project/settings.py b/example_project/settings.py
index f4d7ca609..43917523b 100644
--- a/example_project/settings.py
+++ b/example_project/settings.py
@@ -128,7 +128,7 @@ INSTALLED_APPS = [
# 'debug_toolbar',
]
-LOGFILE = '/var/log/django/ishtar.log'
+LOGFILE = ''
LOGGING = {
'version': 1,
@@ -218,8 +218,13 @@ if 'archaeological_files' in EXTRA_APPS:
INSTALLED_APPS += EXTRA_APPS
+PROJECT_SLUG = locals().get('PROJECT_SLUG', 'default')
+
if LOGFILE:
LOGGING['handlers']['logfile']['filename'] = LOGFILE
+else:
+ LOGGING['handlers']['logfile']['filename'] = \
+ '/var/log/django/ishtar-' + PROJECT_SLUG + '.log'
INTERNAL_IPS = ('127.0.0.1',)