def create_destinations(self):
# type: () -> List[AbstractDestination]
destinations = [] # type: List[AbstractDestination]
if self._config.get('flush_stdout'):
destinations.append(Stdout())
if self._config.get('flush_graphite'):
for graphite_address in self._config['flush_graphite'].split(','):
graphite_address = graphite_address.strip().split(':')
graphite_host = graphite_address.pop(0).strip()
graphite_port = graphite_address and int(graphite_address.pop(
)) or 2003
destinations.append(Graphite(graphite_host, graphite_port))
if self._config.get('flush_file'):
for file_path in self._config['flush_file'].split('|'):
destinations.append(TextFile(file_path))
if self._config.get('flush_file_csv'):
for file_path in self._config['flush_file_csv'].split('|'):
destinations.append(CsvFile(file_path))
return destinations
评论列表
文章目录