Add a specific tower warnings file in the tower home directory.

Configure the api viewer to emit warnings for 4XX and 5XX status codes
into that file.  Configure it for use on a production system.  Closes AC-685
This commit is contained in:
Matthew Jones
2014-04-04 16:48:56 -04:00
parent f56b716b8f
commit e197bfeb01
3 changed files with 25 additions and 3 deletions

View File

@@ -404,13 +404,27 @@ LOGGING = {
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler',
},
'rotating_file': {
'level': 'WARNING',
'class':'logging.handlers.RotatingFileHandler',
'filters': ['require_debug_false'],
'filename': os.path.join(BASE_DIR, 'tower_warnings.log'),
'maxBytes': 1024*1024*5, # 5 MB
'backupCount': 5,
'formatter':'simple',
},
},
'loggers': {
'django': {
'handlers': ['console'],
},
'django.request': {
'handlers': ['mail_admins', 'console', 'file', 'syslog'],
'handlers': ['mail_admins', 'console', 'file', 'syslog', 'rotating_file'],
'level': 'WARNING',
'propagate': False,
},
'rest_framework.request': {
'handlers': ['mail_admins', 'console', 'file', 'syslog', 'rotating_file'],
'level': 'WARNING',
'propagate': False,
},
@@ -418,7 +432,7 @@ LOGGING = {
'handlers': ['console'],
},
'awx': {
'handlers': ['console', 'file', 'syslog'],
'handlers': ['console', 'file', 'syslog', 'rotating_file'],
'level': 'DEBUG',
},
'awx.main.access': {