diff --git a/cmd/web-console-validator/main.go b/cmd/web-console-validator/main.go index 15ffac50a..95962c2aa 100644 --- a/cmd/web-console-validator/main.go +++ b/cmd/web-console-validator/main.go @@ -45,6 +45,11 @@ func init() { func main() { // Using the same type of logger as in the controller-manager. klog.InitFlags(nil) + // Opt into the new klog behavior so that -stderrthreshold is honored even + // when -logtostderr=true (the default). + // Ref: kubernetes/klog#212, kubernetes/klog#432 + flag.Set("legacy_stderr_threshold_behavior", "false") //nolint:errcheck + flag.Set("stderrthreshold", "INFO") //nolint:errcheck ctrllog.SetLogger(textlogger.NewLogger(textlogger.NewConfig())) logger := ctrllog.Log.WithName("entrypoint")