1
0
Fork 0
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:
Shravan Shetty 2020-03-27 21:36:35 +05:30 committed by GitHub
commit 0e31b09a91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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")