Skip to content

Commit

Permalink
Fix the verify error of logger. (#177)
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
xuezhaojun authored Mar 6, 2024
1 parent 57e29d0 commit 635e1f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/addon-agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog/v2"
"k8s.io/klog/v2/klogr"
"k8s.io/klog/v2/textlogger"
"open-cluster-management.io/addon-framework/pkg/lease"
"open-cluster-management.io/cluster-proxy/pkg/common"
"open-cluster-management.io/cluster-proxy/pkg/util"
Expand All @@ -31,7 +31,7 @@ const envKeyPodNamespace = "POD_NAMESPACE"

func main() {

logger := klogr.New()
logger := textlogger.NewLogger(textlogger.NewConfig())
klog.SetOutput(os.Stdout)
klog.InitFlags(flag.CommandLine)
flag.StringVar(&hubKubeconfig, "hub-kubeconfig", "",
Expand Down
4 changes: 2 additions & 2 deletions cmd/addon-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"k8s.io/client-go/kubernetes"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
"k8s.io/klog/v2"
"k8s.io/klog/v2/klogr"
"k8s.io/klog/v2/textlogger"
"open-cluster-management.io/addon-framework/pkg/addonmanager"
addonutil "open-cluster-management.io/addon-framework/pkg/utils"
addonv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
Expand Down Expand Up @@ -73,7 +73,7 @@ func main() {
var agentInstallAll bool
var enableKubeApiProxy bool

logger := klogr.New()
logger := textlogger.NewLogger(textlogger.NewConfig())
klog.SetOutput(os.Stdout)
klog.InitFlags(flag.CommandLine)
flag.StringVar(&metricsAddr, "metrics-bind-address", ":58080", "The address the metric endpoint binds to.")
Expand Down

0 comments on commit 635e1f5

Please sign in to comment.