Skip to content

Commit

Permalink
TagLatency doesn't have consistence format between default and custom…
Browse files Browse the repository at this point in the history
… format (#1943)

Co-authored-by: Marcelo Gamba <gamba@itstransdata.com>
  • Loading branch information
marcelogamba and Marcelo Gamba committed Jul 4, 2022
1 parent dac929f commit e58ad6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/logger/logger.go
Expand Up @@ -229,7 +229,7 @@ func New(config ...Config) fiber.Handler {
case TagUA:
return buf.WriteString(c.Get(fiber.HeaderUserAgent))
case TagLatency:
return buf.WriteString(stop.Sub(start).String())
return buf.WriteString(fmt.Sprintf("%7v", stop.Sub(start).Round(time.Millisecond)))
case TagBody:
return buf.Write(c.Body())
case TagBytesReceived:
Expand Down

0 comments on commit e58ad6b

Please sign in to comment.