We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8907080 + 7debf8a commit 30ccbcbCopy full SHA for 30ccbcb
main.go
@@ -100,10 +100,12 @@ func main() {
100
}
101
log.SetLevel(ll)
102
103
- // Klog V2 is used by k8s.io/apimachinery/pkg/labels and can throw (a lot) of irrelevant logs
104
- // See https://github.com/kubernetes-sigs/external-dns/issues/2348
105
- defer klog.ClearLogger()
106
- klog.SetLogger(logr.Discard())
+ 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()
107
+ klog.SetLogger(logr.Discard())
108
+ }
109
110
ctx, cancel := context.WithCancel(context.Background())
111
0 commit comments