From ac61343ad4716e095035509b3fc5004b456049cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Baylac-Jacqu=C3=A9?= Date: Fri, 18 Feb 2022 19:09:29 +0100 Subject: [PATCH] backend: logging Axione messages We log the Axione API requests and responses to improve the debugging experience. We probably should put that behind a config flag at some point. --- axione_api/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/axione_api/api.py b/axione_api/api.py index 496a422..5370f73 100644 --- a/axione_api/api.py +++ b/axione_api/api.py @@ -71,8 +71,14 @@ def query_axione(cfg, body): timeout=120, ) conn.request("POST", "/v3/fai", body, headers=headers) + print("") + print("[+] REQUEST") + print(body) response = conn.getresponse() respData = response.read() + print("") + print("[+] RESPONSE") + print(respData) except Exception as e: print("Error while querying Axione: ", file=sys.stderr) print(str(e), file=sys.stderr)