Gated response.ok logging behind a boolean leaving only failed messages reporting
This commit is contained in:
@@ -12,8 +12,11 @@ def buildLog (action, outputs, response):
|
|||||||
except (KeyError, TypeError):
|
except (KeyError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
response_log = False
|
||||||
|
|
||||||
if action.showstatus is True and response.ok:
|
if action.showstatus is True and response.ok:
|
||||||
print(f"{action.name} successful")
|
if response_log:
|
||||||
|
print(f"{action.name} request successful with response {response.status_code}")
|
||||||
|
|
||||||
elif action.showstatus is True and not response.ok:
|
elif action.showstatus is True and not response.ok:
|
||||||
print(f"{action.name} failed with status code {response.status_code}")
|
print(f"{action.name} failed with status code {response.status_code}")
|
||||||
|
|||||||
Reference in New Issue
Block a user