mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
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:
@@ -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': {
|
||||
|
||||
Reference in New Issue
Block a user