mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 15:02:07 -03:30
Enabled syslog by default for all 500 errors.
This commit is contained in:
parent
d2c08d2848
commit
8e0974c688
@ -85,3 +85,21 @@ DEFAULT_FROM_EMAIL = 'webmaster@localhost'
|
||||
# Subject-line prefix for email messages send with django.core.mail.mail_admins
|
||||
# or ...mail_managers. Make sure to include the trailing space.
|
||||
EMAIL_SUBJECT_PREFIX = '[AWX] '
|
||||
|
||||
# Enable logging to syslog. Setting level to ERROR captures 500 errors,
|
||||
# WARNING also logs 4xx responses.
|
||||
LOGGING['handlers']['syslog'] = {
|
||||
'level': 'WARNING',
|
||||
'filters': [],
|
||||
'class': 'logging.handlers.SysLogHandler',
|
||||
'address': '/dev/log',
|
||||
'facility': 'local0',
|
||||
'formatter': 'simple',
|
||||
}
|
||||
|
||||
# Enable the following lines to also log to a file.
|
||||
#LOGGING['handlers']['file'] = {
|
||||
# 'class': 'logging.FileHandler',
|
||||
# 'filename': os.path.join(BASE_DIR, 'awx.log'),
|
||||
# 'formatter': 'simple',
|
||||
#}
|
||||
|
||||
@ -281,7 +281,7 @@ LOGGING = {
|
||||
'formatter': 'simple',
|
||||
},
|
||||
'syslog': {
|
||||
'level': 'ERROR',
|
||||
'level': 'WARNING',
|
||||
'filters': ['require_debug_false'],
|
||||
'class': 'django.utils.log.NullHandler',
|
||||
'formatter': 'simple',
|
||||
|
||||
@ -87,3 +87,21 @@ DEFAULT_FROM_EMAIL = 'webmaster@localhost'
|
||||
# Subject-line prefix for email messages send with django.core.mail.mail_admins
|
||||
# or ...mail_managers. Make sure to include the trailing space.
|
||||
EMAIL_SUBJECT_PREFIX = '[AWX] '
|
||||
|
||||
# Enable logging to syslog. Setting level to ERROR captures 500 errors,
|
||||
# WARNING also logs 4xx responses.
|
||||
LOGGING['handlers']['syslog'] = {
|
||||
'level': 'WARNING',
|
||||
'filters': [],
|
||||
'class': 'logging.handlers.SysLogHandler',
|
||||
'address': '/dev/log',
|
||||
'facility': 'local0',
|
||||
'formatter': 'simple',
|
||||
}
|
||||
|
||||
# Enable the following lines to also log to a file.
|
||||
#LOGGING['handlers']['file'] = {
|
||||
# 'class': 'logging.FileHandler',
|
||||
# 'filename': os.path.join(BASE_DIR, 'awx.log'),
|
||||
# 'formatter': 'simple',
|
||||
#}
|
||||
|
||||
@ -32,8 +32,14 @@ SECRET_KEY = file('/etc/awx/SECRET_KEY', 'rb').read().strip()
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
LOGGING['handlers']['syslog'] = {
|
||||
# ERROR captures 500 errors, WARNING also logs 4xx responses.
|
||||
'level': 'ERROR',
|
||||
'filters': ['require_debug_false'],
|
||||
'class': 'logging.handlers.SysLogHandler',
|
||||
'address': '/dev/log',
|
||||
'facility': 'local0',
|
||||
'formatter': 'simple',
|
||||
}
|
||||
|
||||
SERVER_EMAIL = 'root@localhost'
|
||||
|
||||
@ -33,6 +33,7 @@ SECRET_KEY = file('/etc/awx/SECRET_KEY', 'rb').read().strip()
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
LOGGING['handlers']['syslog'] = {
|
||||
# ERROR captures 500 errors, WARNING also logs 4xx responses.
|
||||
'level': 'ERROR',
|
||||
'filters': ['require_debug_false'],
|
||||
'class': 'logging.handlers.SysLogHandler',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user