Skip to content

Commit

Permalink
Fix log error in conditional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed Jun 12, 2019
1 parent 6f80ce9 commit 6a6b4a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions conditional-log.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func logConditional(levelOK, levelError zapcore.Level, logger *zap.Logger, err e
level = levelOK
} else {
level = levelError
fields = append([]zap.Field{zap.Error(err)}, fields...)
}
logLevel(level, logger, msg, fields...)
}
Expand Down

0 comments on commit 6a6b4a8

Please sign in to comment.