Skip to content

Commit

Permalink
change log level to info for post and put body
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmotea authored Dec 21, 2023
1 parent 21ca574 commit 09b5461
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions BridgeEmulator/flaskUI/restful.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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 + "/"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 + "/"
Expand Down

0 comments on commit 09b5461

Please sign in to comment.