From 7ded6945c1790a19bf551a4932a5bfafffcb93f4 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Sun, 15 Jun 2014 20:53:21 -0700 Subject: [PATCH] Added a -verbose flag, and made a message verbose only. --- cmd/cloudcfg/cloudcfg.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/cloudcfg/cloudcfg.go b/cmd/cloudcfg/cloudcfg.go index 8b3309c57a6..99380f84da9 100644 --- a/cmd/cloudcfg/cloudcfg.go +++ b/cmd/cloudcfg/cloudcfg.go @@ -46,6 +46,7 @@ var ( authConfig = flag.String("auth", os.Getenv("HOME")+"/.kubernetes_auth", "Path to the auth info file. If missing, prompt the user. Only used if doing https.") json = flag.Bool("json", false, "If true, print raw JSON for responses") yaml = flag.Bool("yaml", false, "If true, print raw YAML for responses") + verbose = flag.Bool("verbose", false, "If true, print extra information") ) func usage() { @@ -77,7 +78,9 @@ func readConfig(storage string) []byte { if err != nil { log.Fatalf("Error parsing %v as an object for %v: %#v\n", *config, storage, err) } - log.Printf("Parsed config file successfully; sending:\n%v\n", string(data)) + if *verbose { + log.Printf("Parsed config file successfully; sending:\n%v\n", string(data)) + } return data }