From 91aa7aa352230dcacec966b5250286d927ed9163 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 4 Oct 2016 18:22:44 +0200 Subject: settings: add a simple LOGFILE_NAME parameter --- chimere_example_project/settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chimere_example_project') diff --git a/chimere_example_project/settings.py b/chimere_example_project/settings.py index de386cd..09f5743 100644 --- a/chimere_example_project/settings.py +++ b/chimere_example_project/settings.py @@ -276,7 +276,7 @@ INSTALLED_APPS += [ LOG_PATH = '/var/log/django/' MOBILE_DOMAINS = [] # if you have specific domains for mobile access - +LOGFILE_NAME = "" try: from local_settings import * except ImportError as e: @@ -328,6 +328,8 @@ if 'LOGGING' not in globals(): }, } +if LOGFILE_NAME: + LOGGING['handlers']['logfile']['filename'] = LOGFILE_NAME if 'CHIMERE_SHARE_NETWORKS' not in globals(): # after the locals to get the right STATIC_URL -- cgit v1.2.3