Skip to content

Commit

Permalink
increase logging level for dotenv log message
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vroldanbet committed Aug 25, 2023
1 parent d023222 commit 825c151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cobrautil.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 825c151

Please sign in to comment.