Skip to content

Commit

Permalink
fix for etcd-io#19066 Print warnings when deprecated options are conf…
Browse files Browse the repository at this point in the history
…igured in config file

Signed-off-by: mansoora <[email protected]>
  • Loading branch information
mansoor17syed committed Jan 10, 2025
1 parent d1f4692 commit 1c39269
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions server/etcdmain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,20 +182,6 @@ func (cfg *config) parse(arguments []string) error {
return perr
}

var warningsForDeprecatedFlags []string
cfg.cf.flagSet.Visit(func(f *flag.Flag) {
if msg, ok := deprecatedFlags[f.Name]; ok {
warningsForDeprecatedFlags = append(warningsForDeprecatedFlags, msg)
}
})
if len(warningsForDeprecatedFlags) > 0 {
if lg := cfg.ec.GetLogger(); lg != nil {
for _, msg := range warningsForDeprecatedFlags {
lg.Warn(msg)
}
}
}

// now logger is set up
return err
}
Expand Down

0 comments on commit 1c39269

Please sign in to comment.