mirror of
https://github.com/containerd/containerd.git
synced 2026-08-09 09:33:06 +00:00
klog has a long-standing bug where setting -logtostderr=true causes the -stderrthreshold flag to be silently ignored. All log messages are sent to stderr regardless of their severity. klog v2.140.0 introduced two new flags that allow callers to opt into the correct behavior: -legacy_stderr_threshold_behavior=false -stderrthreshold=INFO Set them in the CRI plugin's setGLogLevel() function, right after klog.InitFlags() and before any other flag configuration. Reference: kubernetes/klog#212 Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>