mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-01-19 16:12:52 +08:00
Merge pull request #91712 from KobayashiD27/structured-logging-in-event
Migrate log to klog.InfoS for staging/src/k8s.io/client-go Kubernetes-commit: 00d6255f440f4513dfaafaf6c0d0206ab9e9bd22
This commit is contained in:
commit
9b21f64fec
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -448,7 +448,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go",
|
||||
"Rev": "57681663d939"
|
||||
"Rev": "e0abfaa8efde"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/code-generator",
|
||||
|
@ -97,7 +97,7 @@ func NewController(
|
||||
utilruntime.Must(samplescheme.AddToScheme(scheme.Scheme))
|
||||
klog.V(4).Info("Creating event broadcaster")
|
||||
eventBroadcaster := record.NewBroadcaster()
|
||||
eventBroadcaster.StartLogging(klog.Infof)
|
||||
eventBroadcaster.StartStructuredLogging(0)
|
||||
eventBroadcaster.StartRecordingToSink(&typedcorev1.EventSinkImpl{Interface: kubeclientset.CoreV1().Events("")})
|
||||
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: controllerAgentName})
|
||||
|
||||
|
4
go.mod
4
go.mod
@ -7,7 +7,7 @@ go 1.13
|
||||
require (
|
||||
k8s.io/api v0.0.0-20200619212010-fd326d3007d3
|
||||
k8s.io/apimachinery v0.0.0-20200619211815-2d992b89ee69
|
||||
k8s.io/client-go v0.0.0-20200623052157-57681663d939
|
||||
k8s.io/client-go v0.0.0-20200623092459-e0abfaa8efde
|
||||
k8s.io/code-generator v0.0.0-20200619211621-92e2f57872e8
|
||||
k8s.io/klog/v2 v2.1.0
|
||||
)
|
||||
@ -17,6 +17,6 @@ replace (
|
||||
golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13
|
||||
k8s.io/api => k8s.io/api v0.0.0-20200619212010-fd326d3007d3
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200619211815-2d992b89ee69
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20200623052157-57681663d939
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20200623092459-e0abfaa8efde
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20200619211621-92e2f57872e8
|
||||
)
|
||||
|
2
go.sum
2
go.sum
@ -301,7 +301,7 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
k8s.io/api v0.0.0-20200619212010-fd326d3007d3/go.mod h1:ZABjG3iJlkyRBRLgm8C9YMUfxRTxkqde+hKrHyLy8T8=
|
||||
k8s.io/apimachinery v0.0.0-20200619211815-2d992b89ee69/go.mod h1:PEdH+SOrD19FEfB7ciLjjkHmv6vOtf8ABeo3JqletDo=
|
||||
k8s.io/client-go v0.0.0-20200623052157-57681663d939/go.mod h1:t7Ys8P1+3hAXXIg/YAxFablaeuzkaDs8hVcOk/Z3et8=
|
||||
k8s.io/client-go v0.0.0-20200623092459-e0abfaa8efde/go.mod h1:t7Ys8P1+3hAXXIg/YAxFablaeuzkaDs8hVcOk/Z3et8=
|
||||
k8s.io/code-generator v0.0.0-20200619211621-92e2f57872e8/go.mod h1:LGesfSUjHS76D8GCsc8HmW3s3cPPk3e+wPVagQ5sFds=
|
||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14 h1:t4L10Qfx/p7ASH3gXCdIUtPbbIuegCoUJf3TMSFekjw=
|
||||
|
Loading…
Reference in New Issue
Block a user