@@ -257,8 +257,6 @@ func (c *Conn) Call(ctx context.Context, method string, params, result interface
257
257
c .pendingMu .Unlock ()
258
258
}()
259
259
260
- start := time .Now ()
261
-
262
260
c .Logger .Debug (Send ,
263
261
zap .String ("req.JSONRPC" , req .JSONRPC ),
264
262
zap .String ("id" , id .String ()),
@@ -273,10 +271,8 @@ func (c *Conn) Call(ctx context.Context, method string, params, result interface
273
271
// wait for the response
274
272
select {
275
273
case resp := <- rchan :
276
- elapsed := time .Since (start )
277
274
c .Logger .Debug (Receive ,
278
275
zap .Stringer ("resp.ID" , resp .ID ),
279
- zap .Duration ("elapsed" , elapsed ),
280
276
zap .String ("req.Method" , req .Method ),
281
277
zap .Any ("resp.Result" , resp .Result ),
282
278
zap .Any ("resp.Error" , resp .Error ),
@@ -345,8 +341,6 @@ func (r *Request) Reply(ctx context.Context, result interface{}, err error) erro
345
341
r .Parallel ()
346
342
r .state = requestReplied
347
343
348
- elapsed := time .Since (r .start )
349
-
350
344
var raw * json.RawMessage
351
345
if err == nil {
352
346
raw , err = marshalInterface (result )
@@ -368,13 +362,6 @@ func (r *Request) Reply(ctx context.Context, result interface{}, err error) erro
368
362
369
363
data , err := json .Marshal (resp ) // TODO(zchee): use gojay
370
364
if err != nil {
371
- r .conn .Logger .Error (Send ,
372
- zap .String ("resp.ID" , resp .ID .String ()),
373
- zap .Duration ("elapsed" , elapsed ),
374
- zap .String ("r.Method" , r .Method ),
375
- zap .Any ("resp.Result" , resp .Result ),
376
- zap .Error (err ),
377
- )
378
365
return Errorf (ParseError , "failed to marshaling reply response: %v" , err )
379
366
}
380
367
0 commit comments