Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ func ReadInConfig() error { return v.ReadInConfig() }
// ReadInConfig will discover and load the configuration file from disk
// and key/value stores, searching in one of the defined paths.
func (v *Viper) ReadInConfig() error {
v.logger.Info("attempting to read in config file")
v.logger.Debug("attempting to read in config file")
filename, err := v.getConfigFile()
if err != nil {
return err
Expand All @@ -1590,7 +1590,7 @@ func (v *Viper) ReadInConfig() error {
return UnsupportedConfigError(v.getConfigType())
}

v.logger.Debug("reading file", "file", filename)
v.logger.Info("reading file", "file", filename)

file, err := afero.ReadFile(v.fs, filename)
if errors.Is(err, fs.ErrNotExist) {
Expand All @@ -1617,7 +1617,7 @@ func MergeInConfig() error { return v.MergeInConfig() }

// MergeInConfig merges a new configuration with an existing config.
func (v *Viper) MergeInConfig() error {
v.logger.Info("attempting to merge in config file")
v.logger.Debug("attempting to merge in config file")
filename, err := v.getConfigFile()
if err != nil {
return err
Expand All @@ -1627,6 +1627,8 @@ func (v *Viper) MergeInConfig() error {
return UnsupportedConfigError(v.getConfigType())
}

v.logger.Info("merging file into config", "file", filename)

file, err := afero.ReadFile(v.fs, filename)
if err != nil {
return err
Expand Down
Loading