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 (gofiber#1943)

Co-authored-by: Marcelo Gamba <gamba@itstransdata.com>
  • Loading branch information
2 people authored and trim21 committed Aug 15, 2022
1 parent f351c5a commit ba7b98a
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 ba7b98a

Please sign in to comment.