mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Merge pull request #773 from nirmata/bug_fix_event
use klog as logger for event broadcasting
This commit is contained in:
commit
0e31b09a91
1 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ import (
|
|||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/tools/record"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
//Generator generate events
|
||||
|
@ -66,7 +67,7 @@ func initRecorder(client *client.Client, eventSource Source, log logr.Logger) re
|
|||
return nil
|
||||
}
|
||||
eventBroadcaster := record.NewBroadcaster()
|
||||
eventBroadcaster.StartLogging(log.Info)
|
||||
eventBroadcaster.StartLogging(klog.Infof)
|
||||
eventInterface, err := client.GetEventsInterface()
|
||||
if err != nil {
|
||||
log.Error(err, "failed to get event interface for logging")
|
||||
|
|
Loading…
Add table
Reference in a new issue