Only print config when log level is debug
On boot, Cadence currently prints the entire contents of the
configuration to logs which includes sensitive information such as
datastore credentials. This change only enables config printing when log
level is debug.
@@ -52,7 +52,9 @@ func startHandler(c *cli.Context) {
if err != nil {
log.Fatal("Config file corrupted.", err)
}
+ if cfg.Log.Level == "debug" {
log.Printf("config=\n%v\n", cfg.String())
+ }
if err := cfg.Validate(); err != nil {
log.Fatalf("config validation failed: %v", err)
