Browse Source

define django log file in environment variable

Hendrik Sünkler 9 years ago
parent
commit
b5364fcfb9
2 changed files with 4 additions and 1 deletions
  1. 3
    0
      README.md
  2. 1
    1
      tickets/settings.py

+ 3
- 0
README.md View File

@@ -30,6 +30,9 @@ Sensitive and installation dependent information is expected in environment vari
30 30
 export DJANGO_SECRET_KEY="xxx"
31 31
 export DJANGO_PRODUCTION_DOMAIN="xxx"
32 32
 
33
+# log file
34
+export DJANGO_LOG_FILE="xxx"
35
+
33 36
 # static and media files dir in production
34 37
 export DJANGO_STATIC_ROOT="xxx"
35 38
 export DJANGO_MEDIA_ROOT="xxx"

+ 1
- 1
tickets/settings.py View File

@@ -124,7 +124,7 @@ LOGGING = {
124 124
         'file': {
125 125
             'level': 'INFO',
126 126
             'class': 'logging.FileHandler',
127
-            'filename': '../logs/django-tickets.log',
127
+            'filename': os.environ["DJANGO_LOG_FILE"],
128 128
             'formatter': 'verbose'
129 129
         },
130 130
         'mail_admins': {

Loading…
Cancel
Save