Skip to content

Commit

Permalink
Break loop early
Browse files Browse the repository at this point in the history
Break loop early whe `f.Key == t.Key` but the values are different.
  • Loading branch information
belimawr committed Apr 24, 2024
1 parent a73eab0 commit 1dca25a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions logp/typedloggercore.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func (t *typedLoggerCore) Write(e zapcore.Entry, fields []zapcore.Field) error {
if f.String == t.value {
return t.typedCore.Write(e, fields)
}
return t.defaultCore.Write(e, fields)
}
}

Expand Down

0 comments on commit 1dca25a

Please sign in to comment.