Properly root log path in logstash gearman client.
* modules/openstack_project/files/logstash/log-gearman-client.py: BASE_LOG_PATH is a relative dir and is not rooted. Provide the root '/' when constructing the source URL for the gearman workers. Change-Id: I8fcfa19b048019398ffd370d74c271b9656a8688
This commit is contained in:
parent
a14f6a5f1e
commit
0e66fcdce1
@ -76,7 +76,7 @@ class EventProcessor(threading.Thread):
|
|||||||
|
|
||||||
def _get_log_dir(self, event):
|
def _get_log_dir(self, event):
|
||||||
parameters = event["build"].get("parameters", {})
|
parameters = event["build"].get("parameters", {})
|
||||||
base = parameters.get('BASE_LOG_PATH', '/periodic')
|
base = parameters.get('BASE_LOG_PATH', 'periodic')
|
||||||
base += '/{name}/{number}/'.format(
|
base += '/{name}/{number}/'.format(
|
||||||
name=event.get("name", "UNKNOWN"),
|
name=event.get("name", "UNKNOWN"),
|
||||||
number=event["build"].get("number", "UNKNOWN"))
|
number=event["build"].get("number", "UNKNOWN"))
|
||||||
@ -102,7 +102,7 @@ class EventProcessor(threading.Thread):
|
|||||||
def _parse_event(self, event, fileopts):
|
def _parse_event(self, event, fileopts):
|
||||||
fields = self._parse_fields(event, fileopts['name'])
|
fields = self._parse_fields(event, fileopts['name'])
|
||||||
log_dir = self._get_log_dir(event)
|
log_dir = self._get_log_dir(event)
|
||||||
source_url = fileopts.get('source-url', self.source_url) + \
|
source_url = fileopts.get('source-url', self.source_url) + '/' + \
|
||||||
log_dir + fileopts['name']
|
log_dir + fileopts['name']
|
||||||
out_event = {}
|
out_event = {}
|
||||||
out_event["@fields"] = fields
|
out_event["@fields"] = fields
|
||||||
|
Loading…
x
Reference in New Issue
Block a user