Gated response.ok logging behind a boolean leaving only failed messages reporting

This commit is contained in:
Lyncoln
2026-10-28 01:20:21 -04:00
parent 5ef08fc94f
commit 148cd55c82
+4 -1
View File
@@ -12,8 +12,11 @@ def buildLog (action, outputs, response):
except (KeyError, TypeError):
pass
response_log = False
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:
print(f"{action.name} failed with status code {response.status_code}")