Migrate to klog v2

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-08-08 19:31:02 -04:00
parent c500bd4b3f
commit cb86c5698c
38 changed files with 47 additions and 43 deletions

View file

@ -23,7 +23,7 @@ import (
"strings"
"time"
"k8s.io/klog"
"k8s.io/klog/v2"
"github.com/mitchellh/hashstructure"
"github.com/mitchellh/mapstructure"

View file

@ -41,7 +41,7 @@ import (
networkingv1beta1 "k8s.io/api/networking/v1beta1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/ingress-nginx/internal/ingress"
"k8s.io/ingress-nginx/internal/ingress/annotations/influxdb"
@ -96,7 +96,7 @@ func (t *Template) Write(conf config.TemplateConfig) ([]byte, error) {
outCmdBuf := t.bp.Get()
defer t.bp.Put(outCmdBuf)
if klog.V(3) {
if klog.V(3).Enabled() {
b, err := json.Marshal(conf)
if err != nil {
klog.Errorf("unexpected error: %v", err)