diff --git a/experimental_logger.go b/experimental_logger.go new file mode 100644 index 0000000..206dad6 --- /dev/null +++ b/experimental_logger.go @@ -0,0 +1,11 @@ +//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 + }) +}