Merge pull request #789 from adamreese/feat/kube-logging

feat(kube): use env variable to control kube logging
pull/791/head
Adam Reese 9 years ago
commit 2b3892ce60

@ -2,7 +2,6 @@ package main
import ( import (
"errors" "errors"
"flag"
"fmt" "fmt"
"os" "os"
"strings" "strings"
@ -62,7 +61,6 @@ func init() {
p.StringVar(&helmHome, "home", home, "location of your Helm config. Overrides $HELM_HOME.") p.StringVar(&helmHome, "home", home, "location of your Helm config. Overrides $HELM_HOME.")
p.StringVar(&tillerHost, "host", thost, "address of tiller. Overrides $HELM_HOST.") p.StringVar(&tillerHost, "host", thost, "address of tiller. Overrides $HELM_HOST.")
p.BoolVarP(&flagDebug, "debug", "", false, "enable verbose output") p.BoolVarP(&flagDebug, "debug", "", false, "enable verbose output")
p.AddGoFlagSet(flag.CommandLine)
} }
func main() { func main() {

@ -0,0 +1,14 @@
package kube
import (
"flag"
"fmt"
"os"
)
func init() {
if level := os.Getenv("KUBE_LOG_LEVEL"); level != "" {
flag.Set("vmodule", fmt.Sprintf("loader=%s,round_trippers=%s,request=%s", level, level, level))
flag.Set("logtostderr", "true")
}
}
Loading…
Cancel
Save