Skip to content
Permalink
Browse files
File-based logging
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 27, 2016
1 parent 8be785b commit c9c776b54c2509864f70b4429db8204df391f701
Showing with 7 additions and 11 deletions.
  1. +7 −11 nikolausers/settings.py
@@ -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.