@@ -292,21 +292,20 @@ func (h *handler) handleCallMsg(ctx *callProc, msg *jsonrpcMessage) *jsonrpcMess
292292 switch {
293293 case msg .isNotification ():
294294 h .handleCall (ctx , msg )
295- h .log .Debug ("Served " + msg . Method , "t" , time .Since (start ))
295+ h .log .Debug ("Served" , "t" , time .Since (start ), "method" , msg . Method , "params" , string ( msg . Params ))
296296 return nil
297297 case msg .isCall ():
298298 resp := h .handleCall (ctx , msg )
299299 var ctx []interface {}
300- ctx = append (ctx , "reqid" , idForLog {msg .ID }, "t" , time .Since (start ))
300+ ctx = append (ctx , "method" , msg . Method , " reqid" , idForLog {msg .ID }, "t" , time .Since (start ))
301301 if resp .Error != nil {
302302 ctx = append (ctx , "err" , resp .Error .Message )
303303 if resp .Error .Data != nil {
304304 ctx = append (ctx , "errdata" , resp .Error .Data )
305305 }
306- h .log .Warn ("Served " + msg .Method , ctx ... )
307- } else {
308- h .log .Debug ("Served " + msg .Method , ctx ... )
306+ h .log .Warn ("Served" , ctx ... )
309307 }
308+ h .log .Debug ("Served" , "t" , time .Since (start ), "method" , msg .Method , "reqid" , idForLog {msg .ID }, "params" , string (msg .Params ))
310309 return resp
311310 case msg .hasValidID ():
312311 return msg .errorResponse (& invalidRequestError {"invalid request" })
0 commit comments