diff --git a/middleware/log.go b/middleware/log.go index 8d3072e06bdddde5d18553f3b72b819f3c29b977..b3acf90bf2cbac697edd2507835cc7d2da1c3c2c 100644 --- a/middleware/log.go +++ b/middleware/log.go @@ -14,7 +14,7 @@ func Logger(next jrpc.Handler) jrpc.Handler { fn := func(w jrpc.ResponseWriter, r *jrpc.Request) { start := time.Now() next.ServeRPC(w, r) - log.Trace().Dur("dur", time.Now().Sub(start)).Str("method", r.Method()).Str("params", string(r.Msg().Params)).Msg("RPC Request") + log.Trace().Interface("ms", time.Since(start)).Str("method", r.Method()).Str("params", string(r.Msg().Params)).Msg("RPC Request") } return jrpc.HandlerFunc(fn) }