From 674720e922673c69232f430cb09b1bdef3424fe1 Mon Sep 17 00:00:00 2001 From: Talor Itzhak Date: Mon, 11 Oct 2021 21:36:54 +0300 Subject: [PATCH] topology-updater:fix klog initialization We should use the same flag set for both program and klog arguments. Otherwise we won't be able to provide klog flags properly Signed-off-by: Talor Itzhak --- cmd/nfd-topology-updater/main.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cmd/nfd-topology-updater/main.go b/cmd/nfd-topology-updater/main.go index ede3bbca20..1aa1260972 100644 --- a/cmd/nfd-topology-updater/main.go +++ b/cmd/nfd-topology-updater/main.go @@ -118,13 +118,7 @@ func initFlags(flagset *flag.FlagSet) (*topology.Args, *resourcemonitor.Args) { flagset.StringVar(&args.ServerNameOverride, "server-name-override", "", "Hostname expected from server certificate, useful in testing") - initKlogFlags(flagset) + klog.InitFlags(flagset) return args, resourcemonitorArgs } - -func initKlogFlags(flagset *flag.FlagSet) { - flags := flag.NewFlagSet("klog flags", flag.ExitOnError) - //flags.SetOutput(ioutil.Discard) - klog.InitFlags(flags) -}