good morning!!!!

Skip to content
Snippets Groups Projects
Commit 5881b32e authored by a's avatar a
Browse files

update middleware

parent 0d7e58b5
No related branches found
Tags v0.0.24
No related merge requests found
......@@ -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)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment