Skip to content

Commit

Permalink
[CLOUDTRUST-4683] Use milliseconds for duration in access logs
Browse files Browse the repository at this point in the history
  • Loading branch information
fperot74 authored Dec 1, 2022
1 parent 511e0d7 commit 5dcb0bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http/accesslog_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (h accessLogHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
}

defer func(begin time.Time) {
_ = h.logger.Log("method", req.Method, "uri", uri, "status_code", writer.Status(), "size", writer.Size(), "time", time.Since(begin))
_ = h.logger.Log("method", req.Method, "uri", uri, "status_code", writer.Status(), "size", writer.Size(), "time", time.Since(begin).Milliseconds())
}(time.Now())

h.handler.ServeHTTP(writer, req)
Expand Down

0 comments on commit 5dcb0bc

Please sign in to comment.