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
commit2018f169a8eccdd4f08bdd9cc27edc2e238d1eb6 (patch)
tree451aeccf75f3cfcd84f05df973ea08c7a45e0a32 /example_project/settings.py
parentc50678be0bd848295425e7ec0361b9b190c0ad00 (diff)
downloadIshtar-2018f169a8eccdd4f08bdd9cc27edc2e238d1eb6.tar.bz2
Ishtar-2018f169a8eccdd4f08bdd9cc27edc2e238d1eb6.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',)