Skip to content

Commit

Permalink
pkg/kgo: fix OptValue with no logger set
Browse files Browse the repository at this point in the history
Closes #656.
  • Loading branch information
twmb committed Jan 21, 2024
1 parent d739f01 commit 8d30de0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kgo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (cl *Client) OptValues(opt any) []any {
case namefn(SoftwareNameAndVersion):
return []any{cfg.softwareName, cfg.softwareVersion}
case namefn(WithLogger):
if cfg.logger != nil {
if _, wrapped := cfg.logger.(*wrappedLogger); wrapped {
return []any{cfg.logger.(*wrappedLogger).inner}
}
return []any{nil}
Expand Down

0 comments on commit 8d30de0

Please sign in to comment.