Repository: spf13/viper
Pull request #1254 (2021-12-02 17:26:36)

build(deps): bump gopkg.in/ini.v1 from 1.65.0 to 1.66.2
Bumps [gopkg.in/ini.v1](https://github.com/go-ini/ini) from 1.65.0 to 1.66.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/go-ini/ini/releases">gopkg.in/ini.v1's releases</a>.</em></p>
<blockquote>
<h2>1.66.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix nested values can span sections by <a href="https://github.com/ravron"><code>@​ravron</code></a> in <a href="https://github-redirect.dependabot.com/go-ini/ini/pull/306">go-ini/ini#306</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/ravron"><code>@​ravron</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/go-ini/ini/pull/306">go-ini/ini#306</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/go-ini/ini/compare/v1.66.1...v1.66.2">https://github.com/go-ini/ini/compare/v1.66.1...v1.66.2</a></p>
<h2>1.66.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix python multiline EOF error by <a href="https://github.com/gandarez"><code>@​gandarez</code></a> in <a href="https://github-redirect.dependabot.com/go-ini/ini/pull/309">go-ini/ini#309</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/go-ini/ini/compare/v1.66.0...v1.66.1">https://github.com/go-ini/ini/compare/v1.66.0...v1.66.1</a></p>
<h2>1.66.0</h2>
<h2>What's Changed</h2>
<ul>
<li>file: add <code>HasSection</code> method by <a href="https://github.com/bryanpedini"><code>@​bryanpedini</code></a> in <a href="https://github-redirect.dependabot.com/go-ini/ini/pull/308">go-ini/ini#308</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/bryanpedini"><code>@​bryanpedini</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/go-ini/ini/pull/308">go-ini/ini#308</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/go-ini/ini/compare/v1.65.0...v1.66.0">https://github.com/go-ini/ini/compare/v1.65.0...v1.66.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/go-ini/ini/commit/c71eccd557feacd4fcd29f322a99e98870f908b7"><code>c71eccd</code></a> Fix nested values can span sections (<a href="https://github-redirect.dependabot.com/go-ini/ini/issues/306">#306</a>)</li>
<li><a href="https://github.com/go-ini/ini/commit/3ca1e6ad324e3b4b4cb107e6c5117f4ec475de08"><code>3ca1e6a</code></a> Fix python multiline EOF error (<a href="https://github-redirect.dependabot.com/go-ini/ini/issues/309">#309</a>)</li>
<li><a href="https://github.com/go-ini/ini/commit/b5054165a689da0bebdbfb077bed765ebeac789e"><code>b505416</code></a> file: add <code>HasSection</code> method (<a href="https://github-redirect.dependabot.com/go-ini/ini/issues/308">#308</a>)</li>
<li>See full diff in <a href="https://github.com/go-ini/ini/compare/v1.65.0...v1.66.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gopkg.in/ini.v1&package-manager=go_modules&previous-version=1.65.0&new-version=1.66.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
Dependabot will merge this PR once CI passes on it, as requested by @sagikazarmark.

[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

CLAassistant: [![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/spf13/viper?pullRequest=1254) <br/>Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/spf13/viper?pullRequest=1254) before we can accept your contribution.<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/spf13/viper?pullRequest=1254) it.</sub>
github-actions[bot]: 👋 Thanks for contributing to Viper! You are awesome! 🎉

A maintainer will take a look at your pull request shortly. 👀

In the meantime: We are working on **Viper v2** and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.

⏰ If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9

📣 If you've already given us your feedback, you can still help by spreading the news,
either by sharing the above link or telling people about this on Twitter:

https://twitter.com/sagikazarmark/status/1306904078967074816

**Thank you!** ❤️


Patch:
diff --git a/go.mod b/go.mod
index 8a31f72..b295f28 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ require (
 	github.com/fsnotify/fsnotify v1.5.1
 	github.com/hashicorp/hcl v1.0.0
 	github.com/magiconair/properties v1.8.5
-	github.com/mitchellh/mapstructure v1.4.2
+	github.com/mitchellh/mapstructure v1.4.3
 	github.com/pelletier/go-toml v1.9.4
 	github.com/sagikazarmark/crypt v0.2.0
 	github.com/spf13/afero v1.6.0
@@ -15,7 +15,7 @@ require (
 	github.com/spf13/pflag v1.0.5
 	github.com/stretchr/testify v1.7.0
 	github.com/subosito/gotenv v1.2.0
-	gopkg.in/ini.v1 v1.65.0
+	gopkg.in/ini.v1 v1.66.2
 	gopkg.in/yaml.v2 v2.4.0
 )
 
diff --git a/go.sum b/go.sum
index 7ed1e40..7a2e22e 100644
--- a/go.sum
+++ b/go.sum
@@ -254,8 +254,8 @@ github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdI
 github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
 github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo=
-github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
+github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
@@ -712,8 +712,8 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
-gopkg.in/ini.v1 v1.65.0 h1:B2//IEITFk89S+Nl2tozBeqUvFEpUAY6daarSlrx8jU=
-gopkg.in/ini.v1 v1.65.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
+gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/logger.go b/logger.go
new file mode 100644
index 0000000..0115067
--- /dev/null
+++ b/logger.go
@@ -0,0 +1,77 @@
+package viper
+
+import (
+	"fmt"
+
+	jww "github.com/spf13/jwalterweatherman"
+)
+
+// Logger is a unified interface for various logging use cases and practices, including:
+// 		- leveled logging
+// 		- structured logging
+type Logger interface {
+	// Trace logs a Trace event.
+	//
+	// Even more fine-grained information than Debug events.
+	// Loggers not supporting this level should fall back to Debug.
+	Trace(msg string, keyvals ...interface{})
+
+	// Debug logs a Debug event.
+	//
+	// A verbose series of information events.
+	// They are useful when debugging the system.
+	Debug(msg string, keyvals ...interface{})
+
+	// Info logs an Info event.
+	//
+	// General information about what's happening inside the system.
+	Info(msg string, keyvals ...interface{})
+
+	// Warn logs a Warn(ing) event.
+	//
+	// Non-critical events that should be looked at.
+	Warn(msg string, keyvals ...interface{})
+
+	// Error logs an Error event.
+	//
+	// Critical events that require immediate attention.
+	// Loggers commonly provide Fatal and Panic levels above Error level,
+	// but exiting and panicing is out of scope for a logging library.
+	Error(msg string, keyvals ...interface{})
+}
+
+type jwwLogger struct{}
+
+func (jwwLogger) Trace(msg string, keyvals ...interface{}) {
+	jww.TRACE.Printf(jwwLogMessage(msg, keyvals...))
+}
+
+func (jwwLogger) Debug(msg string, keyvals ...interface{}) {
+	jww.DEBUG.Printf(jwwLogMessage(msg, keyvals...))
+}
+
+func (jwwLogger) Info(msg string, keyvals ...interface{}) {
+	jww.INFO.Printf(jwwLogMessage(msg, keyvals...))
+}
+
+func (jwwLogger) Warn(msg string, keyvals ...interface{}) {
+	jww.WARN.Printf(jwwLogMessage(msg, keyvals...))
+}
+
+func (jwwLogger) Error(msg string, keyvals ...interface{}) {
+	jww.ERROR.Printf(jwwLogMessage(msg, keyvals...))
+}
+
+func jwwLogMessage(msg string, keyvals ...interface{}) string {
+	out := msg
+
+	if len(keyvals) > 0 && len(keyvals)%2 == 1 {
+		keyvals = append(keyvals, nil)
+	}
+
+	for i := 0; i <= len(keyvals)-2; i += 2 {
+		out = fmt.Sprintf("%s %v=%v", out, keyvals[i], keyvals[i+1])
+	}
+
+	return out
+}
diff --git a/util.go b/util.go
index 742f997..ee7a86d 100644
--- a/util.go
+++ b/util.go
@@ -19,7 +19,6 @@ import (
 	"unicode"
 
 	"github.com/spf13/cast"
-	jww "github.com/spf13/jwalterweatherman"
 )
 
 // ConfigParseError denotes failing to parse configuration file.
@@ -87,8 +86,8 @@ func insensitiviseMap(m map[string]interface{}) {
 	}
 }
 
-func absPathify(inPath string) string {
-	jww.INFO.Println("Trying to resolve absolute path to", inPath)
+func absPathify(logger Logger, inPath string) string {
+	logger.Info("trying to resolve absolute path", "path", inPath)
 
 	if inPath == "$HOME" || strings.HasPrefix(inPath, "$HOME"+string(os.PathSeparator)) {
 		inPath = userHomeDir() + inPath[5:]
@@ -105,8 +104,8 @@ func absPathify(inPath string) string {
 		return filepath.Clean(p)
 	}
 
-	jww.ERROR.Println("Couldn't discover absolute path")
-	jww.ERROR.Println(err)
+	logger.Error(fmt.Errorf("could not discover absolute path: %w", err).Error())
+
 	return ""
 }
 
diff --git a/viper.go b/viper.go
index 0b27c19..4a99358 100644
--- a/viper.go
+++ b/viper.go
@@ -39,7 +39,6 @@ import (
 	"github.com/mitchellh/mapstructure"
 	"github.com/spf13/afero"
 	"github.com/spf13/cast"
-	jww "github.com/spf13/jwalterweatherman"
 	"github.com/spf13/pflag"
 	"github.com/subosito/gotenv"
 	"gopkg.in/ini.v1"
@@ -260,6 +259,8 @@ type Viper struct {
 	properties *properties.Properties
 
 	onConfigChange func(fsnotify.Event)
+
+	logger Logger
 }
 
 // New returns an initialized Viper instance.
@@ -277,6 +278,7 @@ func New() *Viper {
 	v.env = make(map[string][]string)
 	v.aliases = make(map[string]string)
 	v.typeByDefValue = false
+	v.logger = jwwLogger{}
 
 	return v
 }
@@ -517,8 +519,9 @@ func AddConfigPath(in string) { v.AddConfigPath(in) }
 
 func (v *Viper) AddConfigPath(in string) {
 	if in != "" {
-		absin := absPathify(in)
-		jww.INFO.Println("adding", absin, "to paths to search")
+		absin := absPathify(v.logger, in)
+
+		v.logger.Info("adding path to search paths", "path", absin)
 		if !stringInSlice(absin, v.configPaths) {
 			v.configPaths = append(v.configPaths, absin)
 		}
@@ -542,7 +545,8 @@ func (v *Viper) AddRemoteProvider(provider, endpoint, path string) error {
 		return UnsupportedRemoteProviderError(provider)
 	}
 	if provider != "" && endpoint != "" {
-		jww.INFO.Printf("adding %s:%s to remote provider list", provider, endpoint)
+		v.logger.Info("adding remote provider", "provider", provider, "endpoint", endpoint)
+
 		rp := &defaultRemoteProvider{
 			endpoint: endpoint,
 			provider: provider,
@@ -574,7 +578,8 @@ func (v *Viper) AddSecureRemoteProvider(provider, endpoint, path, secretkeyring
 		return UnsupportedRemoteProviderError(provider)
 	}
 	if provider != "" && endpoint != "" {
-		jww.INFO.Printf("adding %s:%s to remote provider list", provider, endpoint)
+		v.logger.Info("adding remote provider", "provider", provider, "endpoint", endpoint)
+
 		rp := &defaultRemoteProvider{
 			endpoint:      endpoint,
 			provider:      provider,
@@ -1390,14 +1395,15 @@ func (v *Viper) registerAlias(alias string, key string) {
 			v.aliases[alias] = key
 		}
 	} else {
-		jww.WARN.Println("Creating circular reference alias", alias, key, v.realKey(key))
+		v.logger.Warn("creating circular reference alias", "alias", alias, "key", key, "real_key", v.realKey(key))
 	}
 }
 
 func (v *Viper) realKey(key string) string {
 	newkey, exists := v.aliases[key]
 	if exists {
-		jww.DEBUG.Println("Alias", key, "to", newkey)
+		v.logger.Debug("key is an alias", "alias", key, "to", newkey)
+
 		return v.realKey(newkey)
 	}
 	return key
@@ -1458,7 +1464,7 @@ func (v *Viper) Set(key string, value interface{}) {
 func ReadInConfig() error { return v.ReadInConfig() }
 
 func (v *Viper) ReadInConfig() error {
-	jww.INFO.Println("Attempting to read in config file")
+	v.logger.Info("attempting to read in config file")
 	filename, err := v.getConfigFile()
 	if err != nil {
 		return err
@@ -1468,7 +1474,7 @@ func (v *Viper) ReadInConfig() error {
 		return UnsupportedConfigError(v.getConfigType())
 	}
 
-	jww.DEBUG.Println("Reading file: ", filename)
+	v.logger.Debug("reading file", "file", filename)
 	file, err := afero.ReadFile(v.fs, filename)
 	if err != nil {
 		return err
@@ -1489,7 +1495,7 @@ func (v *Viper) ReadInConfig() error {
 func MergeInConfig() error { return v.MergeInConfig() }
 
 func (v *Viper) MergeInConfig() error {
-	jww.INFO.Println("Attempting to merge in config file")
+	v.logger.Info("attempting to merge in config file")
 	filename, err := v.getConfigFile()
 	if err != nil {
 		return err
@@ -1580,7 +1586,8 @@ func (v *Viper) SafeWriteConfigAs(filename string) error {
 }
 
 func (v *Viper) writeConfig(filename string, force bool) error {
-	jww.INFO.Println("Attempting to write configuration to file.")
+	v.logger.Info("attempting to write configuration to file")
+
 	var configType string
 
 	ext := filepath.Ext(filename)
@@ -1796,7 +1803,7 @@ func mergeMaps(
 	for sk, sv := range src {
 		tk := keyExists(sk, tgt)
 		if tk == "" {
-			jww.TRACE.Printf("tk=\"\", tgt[%s]=%v", sk, sv)
+			v.logger.Trace("", "tk", "\"\"", fmt.Sprintf("tgt[%s]", sk), sv)
 			tgt[sk] = sv
 			if itgt != nil {
 				itgt[sk] = sv
@@ -1806,7 +1813,7 @@ func mergeMaps(
 
 		tv, ok := tgt[tk]
 		if !ok {
-			jww.TRACE.Printf("tgt[%s] != ok, tgt[%s]=%v", tk, sk, sv)
+			v.logger.Trace("", fmt.Sprintf("ok[%s]", tk), false, fmt.Sprintf("tgt[%s]", sk), sv)
 			tgt[sk] = sv
 			if itgt != nil {
 				itgt[sk] = sv
@@ -1817,27 +1824,38 @@ func mergeMaps(
 		svType := reflect.TypeOf(sv)
 		tvType := reflect.TypeOf(tv)
 		if tvType != nil && svType != tvType { // Allow for the target to be nil
-			jww.ERROR.Printf(
-				"svType != tvType; key=%s, st=%v, tt=%v, sv=%v, tv=%v",
-				sk, svType, tvType, sv, tv)
+			v.logger.Error(
+				"svType != tvType",
+				"key", sk,
+				"st", svType,
+				"tt", tvType,
+				"sv", sv,
+				"tv", tv,
+			)
 			continue
 		}
 
-		jww.TRACE.Printf("processing key=%s, st=%v, tt=%v, sv=%v, tv=%v",
-			sk, svType, tvType, sv, tv)
+		v.logger.Trace(
+			"processing",
+			"key", sk,
+			"st", svType,
+			"tt", tvType,
+			"sv", sv,
+			"tv", tv,
+		)
 
 		switch ttv := tv.(type) {
 		case map[interface{}]interface{}:
-			jww.TRACE.Printf("merging maps (must convert)")
+			v.logger.Trace("merging maps (must convert)")
 			tsv := sv.(map[interface{}]interface{})
 			ssv := castToMapStringInterface(tsv)
 			stv := castToMapStringInterface(ttv)
 			mergeMaps(ssv, stv, ttv)
 		case map[string]interface{}:
-			jww.TRACE.Printf("merging maps")
+			v.logger.Trace("merging maps")
 			mergeMaps(sv.(map[string]interface{}), ttv, nil)
 		default:
-			jww.TRACE.Printf("setting value")
+			v.logger.Trace("setting value")
 			tgt[tk] = sv
 			if itgt != nil {
 				itgt[tk] = sv
@@ -1872,7 +1890,7 @@ func (v *Viper) getKeyValueConfig() error {
 	for _, rp := range v.remoteProviders {
 		val, err := v.getRemoteConfig(rp)
 		if err != nil {
-			jww.ERROR.Printf("get remote config: %s", err)
+			v.logger.Error(fmt.Errorf("get remote config: %w", err).Error())
 
 			continue
 		}
diff --git a/viper_go1_15.go b/viper_go1_15.go
index a679af5..19a771c 100644
--- a/viper_go1_15.go
+++ b/viper_go1_15.go
@@ -9,13 +9,12 @@ import (
 	"path/filepath"
 
 	"github.com/spf13/afero"
-	jww "github.com/spf13/jwalterweatherman"
 )
 
 // Search all configPaths for any config file.
 // Returns the first path that exists (and is a config file).
 func (v *Viper) findConfigFile() (string, error) {
-	jww.INFO.Println("Searching for config in ", v.configPaths)
+	v.logger.Info("searching for config in paths", "paths", v.configPaths)
 
 	for _, cp := range v.configPaths {
 		file := v.searchInPath(cp)
@@ -27,11 +26,11 @@ func (v *Viper) findConfigFile() (string, error) {
 }
 
 func (v *Viper) searchInPath(in string) (filename string) {
-	jww.DEBUG.Println("Searching for config in ", in)
+	v.logger.Debug("searching for config in path", "path", in)
 	for _, ext := range SupportedExts {
-		jww.DEBUG.Println("Checking for", filepath.Join(in, v.configName+"."+ext))
+		v.logger.Debug("checking if file exists", "file", filepath.Join(in, v.configName+"."+ext))
 		if b, _ := exists(v.fs, filepath.Join(in, v.configName+"."+ext)); b {
-			jww.DEBUG.Println("Found: ", filepath.Join(in, v.configName+"."+ext))
+			v.logger.Debug("found file", "file", filepath.Join(in, v.configName+"."+ext))
 			return filepath.Join(in, v.configName+"."+ext)
 		}
 	}


Test patch:
diff --git a/util_test.go b/util_test.go
index b294b49..cb4e620 100644
--- a/util_test.go
+++ b/util_test.go
@@ -87,7 +87,7 @@ func TestAbsPathify(t *testing.T) {
 	}
 
 	for _, test := range tests {
-		got := absPathify(test.input)
+		got := absPathify(jwwLogger{}, test.input)
 		if got != test.output {
 			t.Errorf("Got %v\nexpected\n%q", got, test.output)
 		}