diff --git a/cmd/root.go b/cmd/root.go index 5641dbe2..af522194 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -117,6 +117,11 @@ func init() { rootCmd.AddCommand(detectCmd) klog.InitFlags(nil) + + // Opt into fixed stderrthreshold behavior (kubernetes/klog#212). + _ = flag.Set("legacy_stderr_threshold_behavior", "false") + _ = flag.Set("stderrthreshold", "INFO") + pflag.CommandLine.AddGoFlag(flag.CommandLine.Lookup("v")) }