Skip to content
Snippets Groups Projects
Commit ce75caaa authored by gbe's avatar gbe
Browse files

Add level to overall request timings

parent 586ca759
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import (
"time"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/kjk/betterguid"
)
......@@ -30,7 +31,9 @@ func Request(next http.Handler, logger log.Logger) http.Handler {
defer func() {
d := time.Since(start)
logger.Log("duration", d, "msg", "request handled")
level.Info(logger).
Log("duration", d,
"msg", "request handled")
}()
key := contextKey("logger")
......
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