From 3c703356ee0ade9b2d6ab5df5111cb8916f45ec3 Mon Sep 17 00:00:00 2001 From: bprashanth Date: Wed, 21 Sep 2016 18:37:52 -0700 Subject: [PATCH] Fix log level so we log debug output by default. --- controllers/gce/main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/controllers/gce/main.go b/controllers/gce/main.go index 515a2ed33..e0d87672f 100644 --- a/controllers/gce/main.go +++ b/controllers/gce/main.go @@ -162,12 +162,18 @@ func main() { var kubeClient *client.Client var err error var clusterManager *controller.ClusterManager + + // TODO: We can simply parse all go flags with + // flags.AddGoFlagSet(go_flag.CommandLine) + // but that pollutes --help output with a ton of standard go flags. + // We only really need a binary switch from light, v(2) logging to + // heavier debug style V(4) logging, which we use --verbose for. flags.Parse(os.Args) clientConfig := kubectl_util.DefaultClientConfig(flags) - // Set glog verbosity levels + // Set glog verbosity levels, unconditionally set --alsologtostderr. + go_flag.Lookup("logtostderr").Value.Set("true") if *verbose { - go_flag.Lookup("logtostderr").Value.Set("true") go_flag.Set("v", "4") } glog.Infof("Starting GLBC image: %v, cluster name %v", imageVersion, *clusterName)