Skip to content
Snippets Groups Projects
Commit a2137ad0 authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Setting Elasticsearch log level to INFO.

parent 31261101
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,8 @@ def tag_doc( the_doc ):
def index_docs(channel, method, properties, body, es):
t1 = time.time()
decoded_body = msgpack.unpackb(body, raw=False)
decoded_body = msgpack.unpackb(body, raw=False)es_logger = logging.getLogger('elasticsearch')
es_logger.setLevel(logging.INFO)
if type(decoded_body['body']) is list:
#docs_to_index = decoded_body['body']
......@@ -128,6 +129,9 @@ def main(cfg):
es = Elasticsearch([cfg['indexer']['url']], timeout=60)
es_logger = logging.getLogger('elasticsearch')
es_logger.setLevel(logging.INFO)
connection = pika.BlockingConnection(pika.ConnectionParameters(host=cfg['rabbitmq']['host']))
channel = connection.channel()
exchange = cfg['rabbitmq']['exchange']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment