Browse Source

Add logging configuration to the base settings

producao
Marcio Mazza 10 years ago
parent
commit
855a9f1dfa
  1. 30
      sigi/settings/base.py

30
sigi/settings/base.py

@ -144,3 +144,33 @@ THUMBNAIL_ALIASES = {
}
IMAGE_CROPPING_SIZE_WARNING = True
IMAGE_CROPPING_THUMB_SIZE = (800, 600)
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
'include_html': True,
'filters': ['require_debug_false'],
},
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': '/var/log/sigi/application.log',
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins', 'file'],
'level': 'ERROR',
'propagate': True,
},
},
}

Loading…
Cancel
Save