From b91933e79f10863fe8447ac39ce59964e61afecd Mon Sep 17 00:00:00 2001 From: Nicola Peditto Date: Tue, 2 May 2017 15:25:56 +0200 Subject: [PATCH] Bug fixed in conf files templates. Update plugin APIs. Change-Id: Ibb981c4ae8e6f41f9f095af386c0f29b30f68dd0 --- iotronic_lightningrod/plugins/pluginApis.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/iotronic_lightningrod/plugins/pluginApis.py b/iotronic_lightningrod/plugins/pluginApis.py index 1139558..c14c718 100644 --- a/iotronic_lightningrod/plugins/pluginApis.py +++ b/iotronic_lightningrod/plugins/pluginApis.py @@ -53,11 +53,15 @@ def sendRequest(url, action, headers=None, body=None, verbose=False): if verbose: req = json.loads(send) - LOG.info("\nREST REQUEST: HTTP " + str(response['status']) - + " - success = " + str(req['success']) - + " - " + str(req['result']['records'])) + LOG.info("Request:\n" + str(req) + "\n") + LOG.info("Request response:\n" + str(response) + "\n") + # LOG.info("\nREST REQUEST: HTTP " + str(response['status']) + # + " - success = " + str(req['success']) + # + " - " + str(req['result']['records'])) except Exception as err: + req = json.loads(send) + LOG.error("Request Error:\n" + str(req) + "\n") LOG.error("sendRequest error: " + str(err)) - return send + return response, send