From 825c1515c316b7b5b47148e52bd47199c1720512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rold=C3=A1n=20Betancort?= Date: Fri, 25 Aug 2023 10:28:09 +0100 Subject: [PATCH] increase logging level for dotenv log message this is called very early in programs using cobrautil and was being logged with info level. E.g. SpiceDB calls this multiple times during bootstrap and it becomes quite verbose --- cobrautil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobrautil.go b/cobrautil.go index 8e097cf..4e73e85 100644 --- a/cobrautil.go +++ b/cobrautil.go @@ -59,7 +59,7 @@ func SyncViperPreRunE(prefix string) CobraRunFunc { // The .dotenv file is loaded first before any additional Viper behavior. func SyncViperDotEnvPreRunE(prefix, envfilePath string, l logr.Logger) CobraRunFunc { if err := godotenv.Load(stringz.DefaultEmpty(envfilePath, ".env")); err != nil { - l.Info( + l.V(2).Info( "skipped loading dotenv", "path", envfilePath, "err", err,