Skip to content
This repository was archived by the owner on May 19, 2020. It is now read-only.

Commit 51e64ab

Browse files
committed
Fix latency count - 2
1 parent 120634d commit 51e64ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

logger.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ func NewLogger(l *logrus.Logger) gin.HandlerFunc {
4646
})
4747

4848
if comment != "" {
49-
log.WithField("comment", comment)
49+
log = log.WithField("comment", comment)
5050
}
5151

52-
log.WithField("latency", time.Now().Sub(start))
52+
log = log.WithField("latency", time.Now().Sub(start))
5353

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

0 commit comments

Comments
 (0)