Only format data for debug if debugging is enabled
@@ -79,6 +79,7 @@ class ACQUAChemistry(object):
if not isinstance(data, dict):
raise ACQUAChemistryError("Algorithm run result should be a dictionary")
+ if logger.isEnabledFor(logging.DEBUG):
logger.debug('Algorithm returned: {}'.format(json.dumps(data, indent=4)))
convert_json_to_dict(data)
