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
 export DJANGO_SECRET_KEY="xxx"
30
 export DJANGO_SECRET_KEY="xxx"
31
 export DJANGO_PRODUCTION_DOMAIN="xxx"
31
 export DJANGO_PRODUCTION_DOMAIN="xxx"
32
 
32
 
33
+# log file
34
+export DJANGO_LOG_FILE="xxx"
35
+
33
 # static and media files dir in production
36
 # static and media files dir in production
34
 export DJANGO_STATIC_ROOT="xxx"
37
 export DJANGO_STATIC_ROOT="xxx"
35
 export DJANGO_MEDIA_ROOT="xxx"
38
 export DJANGO_MEDIA_ROOT="xxx"

+ 1
- 1
tickets/settings.py View File

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

Loading…
Cancel
Save