add logging
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
|
||||
import os
|
||||
from elasticsearch import Elasticsearch, helpers
|
||||
from searching import es_search, es_client
|
||||
from searching import es_search
|
||||
ELASTIC_QUERY = os.environ.get("ELASTIC_QUERY","Anwesend")
|
||||
import logging
|
||||
|
||||
#for hit in resp["hits"]["hits"]:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
#for hit in resp["hits"]["hits"]: q
|
||||
# print(hit)
|
||||
|
||||
if __name__ =="__main__":
|
||||
logging.debug(f"searching with query: %s\n" % ELASTIC_QUERY)
|
||||
resp = es_search(ELASTIC_QUERY)
|
||||
for hit in resp["hits"]["hits"]:
|
||||
print(f"\n\n%s\n%s\n%s - %s" % (
|
||||
|
||||
Reference in New Issue
Block a user