Fix screwed flag parsing

This commit is contained in:
Asim 2015-08-30 21:22:35 +01:00
parent b94c5d4026
commit 8b2ffc40d2

View File

@ -172,6 +172,9 @@ func Setup(c *cli.Context) error {
)
client.DefaultClient = client.NewClient()
os.Args = os.Args[:1]
flag.Set("logtostderr", fmt.Sprintf("%v", c.Bool("logtostderr")))
flag.Set("alsologtostderr", fmt.Sprintf("%v", c.Bool("alsologtostderr")))
flag.Set("stderrthreshold", c.String("stderrthreshold"))
@ -179,6 +182,7 @@ func Setup(c *cli.Context) error {
flag.Set("log_dir", c.String("log_dir"))
flag.Set("vmodule", c.String("vmodule"))
flag.Set("v", c.String("v"))
flag.Parse()
return nil