Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Review jRPC logs related to user operations #1517

Closed
tclemos opened this issue Jan 6, 2023 · 0 comments · Fixed by #2096
Closed

Review jRPC logs related to user operations #1517

tclemos opened this issue Jan 6, 2023 · 0 comments · Fixed by #2096
Assignees
Labels
Milestone

Comments

@tclemos
Copy link
Contributor

tclemos commented Jan 6, 2023

The current code is logging errors related to user operation as ERROR and this is making it hard to read the logs looking for real errors.

We need to review these logs and find a better way to handle them.

examples:

2023-01-06T20:20:56Z	�[31mERROR�[0m	jsonrpc/server.go:285	execution reverted
2023-01-06T20:20:56Z	�[31mERROR�[0m	jsonrpc/server.go:285	already known

func logging it:

func rpcErrorResponse(code int, errorMessage string, err error) (interface{}, rpcError) {
if err != nil {
log.Errorf("%v:%v", errorMessage, err.Error())
} else {
log.Error(errorMessage)
}
return nil, newRPCError(code, errorMessage)
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant