From 5470fbeb8ac2e4d22a46eb4d82d1a4f30c834bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 16 Sep 2019 20:04:36 +0200 Subject: [PATCH] jsonrpc: include method name in error log --- lib/jsonrpc/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jsonrpc/handler.go b/lib/jsonrpc/handler.go index f5e0138f3..f08d8da20 100644 --- a/lib/jsonrpc/handler.go +++ b/lib/jsonrpc/handler.go @@ -212,7 +212,7 @@ func (h handlers) handle(ctx context.Context, req request, w func(func(io.Writer if handler.errOut != -1 { err := callResult[handler.errOut].Interface() if err != nil { - log.Warnf("error in RPC call: %s", err) + log.Warnf("error in RPC call to '%s': %s", req.Method, err) resp.Error = &respError{ Code: 1, Message: err.(error).Error(),