Skip to content

Commit

Permalink
Fixed WithFields to behave as intended. :D
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasavelin committed Oct 15, 2024
1 parent cf4a6bb commit 20ecdce
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/logging/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ func (l *Logger) WithContext(
func (lw *LoggerWithContext) WithFields(
fields ...zapcore.Field,
) *LoggerWithContext {
if len(fields) > 0 {
return &LoggerWithContext{lw.WithOptions(zap.Fields(fields...))}
}

lw.WithOptions(zap.Fields(fields...))
return lw
}

Expand Down

0 comments on commit 20ecdce

Please # to comment.