Skip to content

Commit 55e3bdc

Browse files
authored
Merge pull request #54 from jtherin/bump1.19klog2
chore: bump klog to 2
2 parents 5cc0eb1 + a0b8ffd commit 55e3bdc

File tree

10 files changed

+13
-16
lines changed

10 files changed

+13
-16
lines changed

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ go 1.15
44

55
require (
66
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200820094136-e5e36003a999
7-
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
87
k8s.io/api v0.19.0
98
k8s.io/apimachinery v0.19.0
109
k8s.io/client-go v0.19.0
1110
k8s.io/cloud-provider v0.19.0
1211
k8s.io/component-base v0.19.0
13-
k8s.io/klog v1.0.0
12+
k8s.io/klog/v2 v2.2.0
1413
k8s.io/kubernetes v1.19.0
1514
)
1615

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,6 @@ k8s.io/csi-translation-lib v0.19.0/go.mod h1:zGS1YqV8U2So/t4Hz8SoRXMx5y5/KSKnA6B
840840
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
841841
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
842842
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
843-
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
844-
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
845843
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
846844
k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=
847845
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=

scaleway/baremetal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
v1 "k8s.io/api/core/v1"
2525
"k8s.io/apimachinery/pkg/types"
2626
cloudprovider "k8s.io/cloud-provider"
27-
"k8s.io/klog"
27+
"k8s.io/klog/v2"
2828
)
2929

3030
type baremetal struct {

scaleway/cloud.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"github.com/scaleway/scaleway-sdk-go/scw"
2929
"k8s.io/client-go/kubernetes"
3030
cloudprovider "k8s.io/cloud-provider"
31-
"k8s.io/klog"
31+
"k8s.io/klog/v2"
3232
)
3333

3434
const (

scaleway/instances.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
v1 "k8s.io/api/core/v1"
2626
"k8s.io/apimachinery/pkg/types"
2727
cloudprovider "k8s.io/cloud-provider"
28-
"k8s.io/klog"
28+
"k8s.io/klog/v2"
2929
)
3030

3131
type instances struct {

scaleway/loadbalancers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
scwlb "github.com/scaleway/scaleway-sdk-go/api/lb/v1"
2828
"github.com/scaleway/scaleway-sdk-go/scw"
2929
v1 "k8s.io/api/core/v1"
30-
"k8s.io/klog"
30+
"k8s.io/klog/v2"
3131
)
3232

3333
const (

scaleway/logger.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55

66
"github.com/scaleway/scaleway-sdk-go/logger"
7-
"k8s.io/klog"
7+
"k8s.io/klog/v2"
88
)
99

1010
// Logger completes klog to be able to implement the Logger interface for the SDK
@@ -14,14 +14,14 @@ var logging Logger
1414

1515
// Debugf logs to DEBUG log. Arguments are handled in the manner of fmt.Printf.
1616
func (Logger) Debugf(format string, args ...interface{}) {
17-
if klog.V(4) {
17+
if klog.V(4).Enabled() {
1818
klog.InfoDepth(2, fmt.Sprintf(format, args...))
1919
}
2020
}
2121

2222
// Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf.
2323
func (Logger) Infof(format string, args ...interface{}) {
24-
if klog.V(2) {
24+
if klog.V(2).Enabled() {
2525
klog.InfoDepth(2, fmt.Sprintf(format, args...))
2626
}
2727
}
@@ -44,11 +44,11 @@ func (Logger) ShouldLog(level logger.LogLevel) bool {
4444
case logger.LogLevelWarning:
4545
return true
4646
case logger.LogLevelInfo:
47-
if klog.V(2) {
47+
if klog.V(2).Enabled() {
4848
return true
4949
}
5050
case logger.LogLevelDebug:
51-
if klog.V(5) {
51+
if klog.V(5).Enabled() {
5252
return true
5353
}
5454
default:

scaleway/patcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"k8s.io/apimachinery/pkg/types"
2727
"k8s.io/apimachinery/pkg/util/strategicpatch"
2828
"k8s.io/client-go/kubernetes"
29-
"k8s.io/klog"
29+
"k8s.io/klog/v2"
3030
)
3131

3232
type kubePatcher struct {

scaleway/servers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
v1 "k8s.io/api/core/v1"
1010
"k8s.io/apimachinery/pkg/types"
1111
cloudprovider "k8s.io/cloud-provider"
12-
"k8s.io/klog"
12+
"k8s.io/klog/v2"
1313
)
1414

1515
const (

scaleway/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"k8s.io/client-go/kubernetes"
3434
"k8s.io/client-go/tools/cache"
3535
"k8s.io/client-go/util/workqueue"
36-
"k8s.io/klog"
36+
"k8s.io/klog/v2"
3737
)
3838

3939
type syncController struct {

0 commit comments

Comments
 (0)