Skip to content

Commit

Permalink
Merge pull request #524 from dgrisonnet/recover-klog-flags
Browse files Browse the repository at this point in the history
cmd/adapter: recover klog flags
  • Loading branch information
dgrisonnet authored Aug 12, 2022
2 parents 7b4ba08 + 303ac6f commit f23e671
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit f23e671

Please sign in to comment.