From 5924acc506685a4114b0a2be6b4c641f13400150 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Sat, 1 Jan 2022 18:49:14 +0100 Subject: [PATCH] feat: experimental logger Signed-off-by: Mark Sagi-Kazar --- experimental_logger.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 experimental_logger.go 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 + }) +}