fix a traceback if tower doesn't have LOG_AGGREGATOR_TOWER_UUID set

see: #5527
This commit is contained in:
Ryan Petrello 2017-03-07 10:10:10 -05:00 committed by Matthew Jones
parent 8ff09ec4f5
commit 255d6afb49

View File

@ -13,7 +13,8 @@ class LogstashFormatter(LogstashFormatterVersion1):
ret = super(LogstashFormatter, self).__init__(**kwargs)
if settings_module:
self.host_id = settings_module.CLUSTER_HOST_ID
self.tower_uuid = settings_module.LOG_AGGREGATOR_TOWER_UUID
if hasattr(settings_module, 'LOG_AGGREGATOR_TOWER_UUID'):
self.tower_uuid = settings_module.LOG_AGGREGATOR_TOWER_UUID
self.message_type = settings_module.LOG_AGGREGATOR_TYPE
return ret