common: reduce jrpc exception spam
When a client repeatedly makes a request that results in an error the log is spammed with tracebacks that don't provide significant value. The method name, code, and error message should be enough for basic troubleshooting. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
d51820f48c
commit
504a3a76f5
|
@ -581,8 +581,8 @@ class JsonRPC:
|
|||
) -> Dict[str, Any]:
|
||||
if method_name:
|
||||
method_name = f"Requested Method: {method_name}, "
|
||||
log_msg = f"JSON-RPC Request Error - {method_name}Code: {code}\n{msg}"
|
||||
if is_exc:
|
||||
log_msg = f"JSON-RPC Request Error - {method_name}Code: {code}, Message: {msg}"
|
||||
if is_exc and self.verbose:
|
||||
logging.exception(log_msg)
|
||||
else:
|
||||
logging.info(log_msg)
|
||||
|
|
Loading…
Reference in New Issue