franz-go
franz-go copied to clipboard
Panic when calling `client.OptValue(kgo.WithLogger)` when logger was not set.
Came across this while writing unit tests to assert I was configuring a client properly.
Wrong assumption made at pkg/kgo/client.go#L239-L243:
case namefn(WithLogger):
if cfg.logger != nil {
return []any{cfg.logger.(*wrappedLogger).inner}
}
return []any{nil}
The default logger is type *nopLogger
pkg/kgo/config.go#L447