Don't discard klog logs at the highest log levels (debug and trace)

This commit is contained in:
Dan Markhasin 2024-12-18 09:55:48 +02:00
parent c25a229e5f
commit 7debf8a768

View File

@ -100,7 +100,7 @@ func main() {
}
log.SetLevel(ll)
if ll >= log.DebugLevel {
if ll < log.DebugLevel {
// Klog V2 is used by k8s.io/apimachinery/pkg/labels and can throw (a lot) of irrelevant logs
// See https://github.com/kubernetes-sigs/external-dns/issues/2348
defer klog.ClearLogger()