201@@ -197,7 +202,7 @@ def _get_response(self):
202 response = json.loads(responsedata, parse_float=decimal.Decimal)
203 elapsed = time.time() - req_start_time
204 if "error" in response and response["error"] is None:
205- log.debug("<-%s- [%.6f] %s" % (response["id"], elapsed, json.dumps(response["result"], default=serialization_fallback, ensure_ascii=self.ensure_ascii)))
206+ log.debug("<-%s- [%.6f] %s" % (response["id"], elapsed, self._json_dumps(response["result"])))
207 else:
208 log.debug("<-- [%.6f] %s" % (elapsed, responsedata))
The RPC request seems to be logged with the AuthServiceProxy.__id_count
but the corresponding non erroneous response doesn’t seem to be. @maflcko Do you know the reason for it and should we improve it later?
0-30-> getreceivedbyaddress
1<-- [0.000553] {"jsonrpc":"2.0"...
Also it would be easier on the eyes to log the suffix s
after the elapsed time but something maybe for another PR.
re: #31955 (review)
The RPC request seems to be logged with the AuthServiceProxy.__id_count
but the corresponding non erroneous response doesn’t seem to be. @maflcko Do you know the reason for it and should we improve it later?
It looks like response["id"]
is explicitly logged in the v1 case and responsedata
which includes the "id"
field is logged in the v2/error case, so the id should be present in both cases. Probably output could be improved and make more consistent though.