mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 16:28:43 -03:30
get logging test endpoint to work again
The handler and formatter classes are expecting an object and the previous method passed a dict, so this change converts the data into a mock settings object.
This commit is contained in:
@@ -22,7 +22,7 @@ class LogstashFormatter(LogstashFormatterVersion1):
|
||||
settings_module = kwargs.pop('settings_module', None)
|
||||
ret = super(LogstashFormatter, self).__init__(**kwargs)
|
||||
if settings_module:
|
||||
self.host_id = settings_module.CLUSTER_HOST_ID
|
||||
self.host_id = getattr(settings_module, 'CLUSTER_HOST_ID', None)
|
||||
if hasattr(settings_module, 'LOG_AGGREGATOR_TOWER_UUID'):
|
||||
self.tower_uuid = settings_module.LOG_AGGREGATOR_TOWER_UUID
|
||||
self.message_type = getattr(settings_module, 'LOG_AGGREGATOR_TYPE', 'other')
|
||||
|
||||
Reference in New Issue
Block a user