File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import (
17
17
cgrecord "k8s.io/client-go/tools/record"
18
18
"k8s.io/component-base/logs"
19
19
logsv1 "k8s.io/component-base/logs/api/v1"
20
+ "k8s.io/klog/v2"
20
21
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
21
22
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
22
23
"sigs.k8s.io/cluster-api/feature"
@@ -80,6 +81,9 @@ func main() {
80
81
os .Exit (1 )
81
82
}
82
83
84
+ // klog.Background will automatically use the right logger.
85
+ ctrl .SetLogger (klog .Background ())
86
+
83
87
// Machine and cluster operations can create enough events to trigger the event recorder spam filter
84
88
// Setting the burst size higher ensures all events will be recorded and submitted to the API
85
89
broadcaster := cgrecord .NewBroadcasterWithCorrelatorOptions (cgrecord.CorrelatorOptions {
You can’t perform that action at this time.
0 commit comments