From 09b546159af2a794a051cce9d78197acc23f617c Mon Sep 17 00:00:00 2001 From: Motea Marius Date: Thu, 21 Dec 2023 13:43:54 +0200 Subject: [PATCH] change log level to info for post and put body --- BridgeEmulator/flaskUI/restful.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BridgeEmulator/flaskUI/restful.py b/BridgeEmulator/flaskUI/restful.py index 43a926630..b092ffaa9 100644 --- a/BridgeEmulator/flaskUI/restful.py +++ b/BridgeEmulator/flaskUI/restful.py @@ -71,7 +71,7 @@ def get(self): def post(self): postDict = request.get_json(force=True) - logging.debug(postDict) + logging.info(postDict) if "devicetype" in postDict: last_button_press = bridgeConfig["config"]["linkbutton"]["lastlinkbuttonpushed"] if last_button_press + 30 >= datetime.now().timestamp(): @@ -150,7 +150,7 @@ def post(self, username, resource): Thread(target=scanForLights).start() return [{"success": {"/" + resource: "Searching for new devices"}}] postDict = request.get_json(force=True) - logging.debug(postDict) + logging.info(postDict) if resource == "lights": # add light manually from the web interface Thread(target=manualAddLight, args=[ postDict["ip"], postDict["protocol"], postDict["config"]]).start() @@ -310,7 +310,7 @@ def put(self, username, resource, resourceid): return authorisation putDict = request.get_json(force=True) - logging.debug(putDict) + logging.info(putDict) currentTime = datetime.now() responseList = [] response_location = "/" + resource + "/" + resourceid + "/" @@ -414,7 +414,7 @@ def put(self, username, resource, resourceid, param): return authorisation putDict = request.get_json(force=True) currentTime = datetime.now() - logging.debug(putDict) + logging.info(putDict) if resource == "lights" and param == "state": # state is applied to a light bridgeConfig[resource][resourceid].setV1State(putDict) elif param == "action": # state is applied to a light @@ -470,7 +470,7 @@ def put(self, username, resource, resourceid, param, paramid): return authorisation putDict = request.get_json(force=True) currentTime = datetime.now() - logging.debug(putDict) + logging.info(putDict) responseList = [] responseLocation = "/" + resource + "/" + \ resourceid + "/" + param + "/" + paramid + "/"