Skip to content

Commit

Permalink
Fix latency count - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
smgladkovskiy committed Oct 6, 2019
1 parent 120634d commit 51e64ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ func NewLogger(l *logrus.Logger) gin.HandlerFunc {
})

if comment != "" {
log.WithField("comment", comment)
log = log.WithField("comment", comment)
}

log.WithField("latency", time.Now().Sub(start))
log = log.WithField("latency", time.Now().Sub(start))

if len(c.Errors) > 0 {
log.Error(c.Errors.ByType(gin.ErrorTypePrivate).String())
Expand Down

0 comments on commit 51e64ab

Please sign in to comment.