Merge "Handle log paths in logstash gearman client better"
This commit is contained in:
commit
0e9795841e
@ -19,6 +19,7 @@ import daemon
|
|||||||
import gear
|
import gear
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import signal
|
import signal
|
||||||
import threading
|
import threading
|
||||||
import yaml
|
import yaml
|
||||||
@ -101,7 +102,7 @@ class EventProcessor(threading.Thread):
|
|||||||
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']
|
os.path.join(log_dir, fileopts['name'])
|
||||||
out_event = {}
|
out_event = {}
|
||||||
out_event["@fields"] = fields
|
out_event["@fields"] = fields
|
||||||
out_event["@tags"] = [fileopts['name']] + fileopts.get('tags', [])
|
out_event["@tags"] = [fileopts['name']] + fileopts.get('tags', [])
|
||||||
|
Loading…
Reference in New Issue
Block a user