Skip to content

Commit

Permalink
File-based logging
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 27, 2016
1 parent 8be785b commit c9c776b
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions nikolausers/settings.py
Expand Up @@ -113,26 +113,22 @@
STATIC_URL = '/static/'
STATIC_ROOT = '/srv/users.getnikola.com/static'


# Logging
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': os.environ['DJANGO_LOG_PATH'],
},
},
'loggers': {
'django.request': {
'handlers': ['console'],
'': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
'django': {
'handlers': ['console'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
'propagate': True,
},
},
}

0 comments on commit c9c776b

Please sign in to comment.