Respect LOG_AGGREGATOR_LEVEL

This commit is contained in:
Shane McDonald
2022-08-18 19:09:49 -04:00
parent cf98edc282
commit e3701dd3db

View File

@@ -81,35 +81,34 @@ data:
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
LOGGING['handlers']['console'] = {
'()': 'logging.StreamHandler',
'level': 'DEBUG',
'formatter': 'simple',
'filters': ['guid'],
}
LOGGING['loggers']['django.request']['handlers'] = ['console']
LOGGING['loggers']['rest_framework.request']['handlers'] = ['console']
LOGGING['loggers']['awx']['handlers'] = ['console', 'external_logger']
LOGGING['loggers']['awx.main.commands.run_callback_receiver']['handlers'] = ['console']
LOGGING['loggers']['awx.main.tasks']['handlers'] = ['console', 'external_logger']
LOGGING['loggers']['awx.main.scheduler']['handlers'] = ['console', 'external_logger']
LOGGING['loggers']['django_auth_ldap']['handlers'] = ['console']
LOGGING['loggers']['social']['handlers'] = ['console']
LOGGING['loggers']['system_tracking_migrations']['handlers'] = ['console']
LOGGING['loggers']['rbac_migrations']['handlers'] = ['console']
LOGGING['handlers']['callback_receiver'] = {'class': 'logging.NullHandler'}
LOGGING['handlers']['task_system'] = {'class': 'logging.NullHandler'}
LOGGING['handlers']['tower_warnings'] = {'class': 'logging.NullHandler'}
LOGGING['handlers']['rbac_migrations'] = {'class': 'logging.NullHandler'}
LOGGING['handlers']['system_tracking_migrations'] = {'class': 'logging.NullHandler'}
LOGGING['handlers']['management_playbooks'] = {'class': 'logging.NullHandler'}
USE_X_FORWARDED_PORT = True
BROADCAST_WEBSOCKET_PORT = 8052
BROADCAST_WEBSOCKET_PROTOCOL = 'http'
# LOGGING in defaults.py is oriented towards VM installs where we write to files under
# /var/log/tower. This ensures everything is logged to stdout.
for handler in LOGGING['handlers']:
if handler == 'external_logger':
continue
if handler == 'console':
LOGGING['handlers'][handler]['filters'].remove('require_debug_true_or_test')
continue
filename = LOGGING['handlers'][handler].get('filename')
if filename:
del LOGGING['handlers'][handler]['filename']
LOGGING['handlers'][handler]['class'] = 'logging.NullHandler'
for logger in LOGGING['loggers']:
handlers = LOGGING['loggers'][logger].get('handlers')
if handlers and 'file' in handlers:
handlers.remove('file')
{% for item in extra_settings | default([]) %}
{{ item.setting }} = {{ item.value }}
{% endfor %}