diff --git a/pkg/rpc/request/params.go b/pkg/rpc/request/params.go index dd2ac35b9..c35e13b43 100644 --- a/pkg/rpc/request/params.go +++ b/pkg/rpc/request/params.go @@ -1,5 +1,7 @@ package request +import "fmt" + type ( // Params represents the JSON-RPC params. Params []Param @@ -23,3 +25,7 @@ func (p Params) ValueWithType(index int, valType paramType) *Param { } return nil } + +func (p Params) String() string { + return fmt.Sprintf("%v", []Param(p)) +} diff --git a/pkg/rpc/server/server.go b/pkg/rpc/server/server.go index 3a56d2ec8..4be7e6f44 100644 --- a/pkg/rpc/server/server.go +++ b/pkg/rpc/server/server.go @@ -291,7 +291,7 @@ func (s *Server) handleRequest(req *request.In, sub *subscriber) response.Abstra s.log.Debug("processing rpc request", zap.String("method", req.Method), - zap.String("params", fmt.Sprintf("%v", reqParams))) + zap.Stringer("params", reqParams)) incCounter(req.Method)