Skip to content

Commit

Permalink
refactor: put log back to debug when default configuration is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
sgaist committed Jul 17, 2024
1 parent 7d3eaeb commit dda5824
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func initConfig(configFile string, pathChanged bool) error {
if err := viper.ReadInConfig(); err != nil {
if errors.Is(err, os.ErrNotExist) {
if !pathChanged {
log.Warnf("Default config file %q not found, using built in values", log.FilePath(configFile))
log.Debugf("Default config file %q not found, using built in values", log.FilePath(configFile))
return nil
}
}
Expand Down Expand Up @@ -197,6 +197,8 @@ func NewRootCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
return xerrors.Errorf("flag bind error: %w", err)
}

log.InitLogger(true, false)

// The config path is needed for config initialization.
// It needs to be obtained before ToOptions().
configPath := viper.GetString(flag.ConfigFileFlag.ConfigName)
Expand Down

0 comments on commit dda5824

Please sign in to comment.