Asset search: debug-log instead of print query + result

This commit is contained in:
Sybren A. Stüvel 2018-01-05 17:29:47 +01:00
parent 36aad45b26
commit 9d39995d0f

View File

@ -80,13 +80,12 @@ def do_node_search(query: str, terms: dict) -> dict:
add_aggs_to_search(search, NODE_AGG_TERMS)
if log.isEnabledFor(logging.DEBUG):
# logging removes readable indendation.
print(json.dumps(search.to_dict(), indent=4))
log.debug(json.dumps(search.to_dict(), indent=4))
response = search.execute()
if log.isEnabledFor(logging.DEBUG):
print(json.dumps(response.to_dict(), indent=4))
log.debug(json.dumps(response.to_dict(), indent=4))
return response.to_dict()