Skip to content

Commit a1f039b

Browse files
committed
Minor fix.
1 parent c96127c commit a1f039b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ingester/__main__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, file_path):
5151
config = AppConfig(args.config)
5252

5353
# set up Elastic logger for the initialization time
54-
logging.getLogger('elasticsearch').setLevel(level=logging.ERROR)
54+
logging.getLogger('elasticsearch').setLevel(level=logging.INFO)
5555

5656
# initialize the elastic source
5757
source_params = config.params['source']
@@ -62,6 +62,9 @@ def __init__(self, file_path):
6262
client_key_path=src_sec['client-key-path'])
6363
es_source_conf = ElasticConnectorConfig(hosts=source_params['es']['hosts'],
6464
ssl_config=source_ssl_config)
65+
elif 'extra_params' in source_params['es']:
66+
e_params = source_params['es']['extra_params']
67+
es_source_conf = ElasticConnectorConfig(hosts=source_params['es']['hosts'], extra_params=e_params)
6568
else:
6669
es_source_conf = ElasticConnectorConfig(hosts=source_params['es']['hosts'])
6770
es_source_conn = ElasticConnector(es_source_conf)
@@ -79,13 +82,14 @@ def __init__(self, file_path):
7982
client_cert_path=sink_sec['client-cert-path'],
8083
client_key_path=sink_sec['client-key-path'])
8184

82-
es_sink_conf = ElasticConnectorConfig(hosts=source_params['es']['hosts'],
85+
es_sink_conf = ElasticConnectorConfig(hosts=sink_params['es']['hosts'],
8386
ssl_config=sink_ssl_config)
8487
elif 'extra_params' in sink_params['es']:
8588
e_params = sink_params['es']['extra_params']
8689
es_sink_conf = ElasticConnectorConfig(hosts=sink_params['es']['hosts'], extra_params=e_params)
8790
else:
8891
es_sink_conf = ElasticConnectorConfig(hosts=sink_params['es']['hosts'])
92+
8993
es_sink_conn = ElasticConnector(es_sink_conf)
9094
es_sink = ElasticIndexer(es_sink_conn, sink_params['es']['index-name'])
9195

0 commit comments

Comments
 (0)