Clean logging on test settings.

This commit is contained in:
juanifioren 2015-06-15 17:23:47 -03:00
parent 124c7366fa
commit 06392c7600

View file

@ -18,49 +18,17 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
) )
LOGGING = { LOGGING = {
'version': 1, 'version': 1,
'disable_existing_loggers': False, 'disable_existing_loggers': False,
'formatters': {
'simple': {
'format': '%(asctime)s %(process)d [%(levelname)s] %(name)s Line: %(lineno)s id: %(process)d : %(message)s'
}
},
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse',
}
},
'handlers': { 'handlers': {
'console': { 'console': {
'class': 'logging.StreamHandler', 'class': 'logging.StreamHandler',
'filters': ['require_debug_false'],
'formatter': 'simple',
}, },
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler',
'formatter': 'simple',
},
"debug_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"level": "DEBUG",
"formatter": "simple",
'filename': 'debug.log',
'formatter': 'simple',
"maxBytes": 10485760,
"backupCount": 20,
"encoding": "utf8"
}
}, },
'loggers': { 'loggers': {
'oidc_provider': { 'oidc_provider': {
'handlers': ['console', 'debug_file_handler'], 'handlers': ['console'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'), 'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
}, },
}, },