Skip to content

Commit

Permalink
Merge pull request #489 from dkulchinsky/dannyk/remove_env_values_fro…
Browse files Browse the repository at this point in the history
…m_logs

don't print env variable values in the logs (some are sensitive)
  • Loading branch information
ckotzbauer authored Jan 5, 2022
2 parents f1255bf + b52a958 commit 91b01b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/kured/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func bindFlags(cmd *cobra.Command, v *viper.Viper) {
// Apply the viper config value to the flag when the flag is not set and viper has a value
if !f.Changed && v.IsSet(f.Name) {
val := v.Get(f.Name)
log.Infof("Binding %s command flag to environment variable: %s=%s", f.Name, flagToEnvVar(f.Name), fmt.Sprintf("%v", val))
log.Infof("Binding %s command flag to environment variable: %s", f.Name, flagToEnvVar(f.Name))
cmd.Flags().Set(f.Name, fmt.Sprintf("%v", val))
}
})
Expand Down

0 comments on commit 91b01b5

Please sign in to comment.