From b0079ac6762f3eec5de14755417e762f81567a26 Mon Sep 17 00:00:00 2001 From: hello2mao Date: Wed, 30 Jan 2019 10:49:54 +0800 Subject: [PATCH] use klog for debug log --- .../baiducloud/baiducloud-sdk-go/util/util.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/baiducloud/baiducloud-sdk-go/util/util.go b/cluster-autoscaler/cloudprovider/baiducloud/baiducloud-sdk-go/util/util.go index 471a076b26d1..627992f0a6e4 100644 --- a/cluster-autoscaler/cloudprovider/baiducloud/baiducloud-sdk-go/util/util.go +++ b/cluster-autoscaler/cloudprovider/baiducloud/baiducloud-sdk-go/util/util.go @@ -30,7 +30,6 @@ import ( "fmt" "io" "io/ioutil" - "log" "math/rand" "net/url" "os" @@ -42,6 +41,8 @@ import ( "strconv" "strings" "time" + + "k8s.io/klog" ) // GetURL gets the full URL for a http request. @@ -562,13 +563,13 @@ func dirWindows() (string, error) { // Debug generates debug info for debug mode. func Debug(title, message string) { if title != "" { - log.Println("----------------------------DEBUG: start of " + title + "----------------------------") + klog.V(5).Infof("----------------------------DEBUG: start of %s ----------------------------", title) } - log.Println(message) + klog.V(5).Infof(message) if title != "" { - log.Println("----------------------------DEBUG: end of " + title + "------------------------------\n") + klog.V(5).Infof("----------------------------DEBUG: end of %s------------------------------", title) } }