Skip to content

Commit

Permalink
cmd/adapter: recover klog flags
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
  • Loading branch information
dgrisonnet committed Aug 12, 2022
1 parent dd85956 commit 303ac6f
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 303ac6f

Please sign in to comment.