move logger out of experimental

This commit is contained in:
tsmethurst 2022-06-03 18:00:24 +02:00
parent 4322cf20e9
commit c02f8ef627
2 changed files with 7 additions and 11 deletions

View file

@ -1,11 +0,0 @@
//go:build viper_logger
// +build viper_logger
package viper
// WithLogger sets a custom logger.
func WithLogger(l Logger) Option {
return optionFunc(func(v *Viper) {
v.logger = l
})
}

View file

@ -281,6 +281,13 @@ func EnvKeyReplacer(r StringReplacer) Option {
})
}
// WithLogger sets a custom logger.
func WithLogger(l Logger) Option {
return optionFunc(func(v *Viper) {
v.logger = l
})
}
// NewWithOptions creates a new Viper instance.
func NewWithOptions(opts ...Option) *Viper {
v := New()