mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
Merge pull request #524 from dgrisonnet/recover-klog-flags
cmd/adapter: recover klog flags
This commit is contained in:
commit
f23e67113a
1 changed files with 4 additions and 1 deletions
|
|
@ -292,7 +292,10 @@ func main() {
|
|||
cmd.OpenAPIConfig.Info.Version = "1.0.0"
|
||||
|
||||
cmd.addFlags()
|
||||
cmd.Flags().AddGoFlagSet(flag.CommandLine) // make sure we get the klog flags
|
||||
// make sure we get klog flags
|
||||
local := flag.NewFlagSet(os.Args[0], flag.ExitOnError)
|
||||
logs.AddGoFlags(local)
|
||||
cmd.Flags().AddGoFlagSet(local)
|
||||
if err := cmd.Flags().Parse(os.Args); err != nil {
|
||||
klog.Fatalf("unable to parse flags: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue