Skip to content

Commit

Permalink
gentler warning message on config-not-found (#13215)
Browse files Browse the repository at this point in the history
* gentler warning message on config-not-found

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* Update go/viperutil/config.go

Co-authored-by: Deepthi Sigireddi <deepthi.sigireddi@gmail.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>

---------

Signed-off-by: Andrew Mason <andrew@planetscale.com>
Co-authored-by: Deepthi Sigireddi <deepthi.sigireddi@gmail.com>
  • Loading branch information
Andrew Mason and deepthi authored Jun 1, 2023
1 parent bc10b74 commit ea38d23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions go/viperutil/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ func LoadConfig() (context.CancelFunc, error) {
msg := "Failed to read in config %s: %s"
switch configFileNotFoundHandling.Get() {
case WarnOnConfigFileNotFound:
msg += ". This is optional, and can be ignored if you are not using config files. For a detailed explanation, see https://github.com/vitessio/vitess/blob/main/doc/viper/viper.md#config-files."
log.WARN(msg, registry.Static.ConfigFileUsed(), nferr.Error())
fallthrough // after warning, ignore the error
case IgnoreConfigFileNotFound:
Expand Down

0 comments on commit ea38d23

Please sign in to comment.