@@ -62,7 +62,7 @@ func ShowPVC(pvcName, PVCRoot string) ([]string, error) {
6262 return pvcList , err
6363 }
6464
65- log .Debug ("\n PVC %s\n " , pvc .Name + " is found" )
65+ log .Debugf ("\n PVC %s\n is found " , pvc .Name )
6666 pvcList , err = printPVCListing (pvc .ObjectMeta .Labels [util .LABEL_PG_CLUSTER ], pvc .Name , PVCRoot )
6767
6868 return pvcList , err
@@ -84,7 +84,7 @@ func printPVCListing(clusterName, pvcName, PVCRoot string) ([]string, error) {
8484 log .Error (err .Error ())
8585 return newlines , err
8686 } else {
87- log .Debug ("deleting prior pod " + podName )
87+ log .Debugf ("deleting prior pod %s" , podName )
8888 err = kubeapi .DeletePod (apiserver .Clientset , podName , apiserver .Namespace )
8989 if err != nil {
9090 return newlines , err
@@ -101,9 +101,9 @@ func printPVCListing(clusterName, pvcName, PVCRoot string) ([]string, error) {
101101
102102 pvcRoot := "/"
103103 if PVCRoot != "" {
104- log .Debug ("using " + PVCRoot + " as the PVC listing root" )
104+ log .Debugf ("using %s as the PVC listing root" , PVCRoot )
105105 pvcRoot = PVCRoot
106- log .Debug ( pvcName + "/" + pvcRoot )
106+ log .Debugf ( "%s/%s" , pvcName , pvcRoot )
107107 } else {
108108 log .Debug (pvcName )
109109 }
@@ -152,9 +152,9 @@ func printPVCListing(clusterName, pvcName, PVCRoot string) ([]string, error) {
152152 logOptions := v1.PodLogOptions {}
153153 req := apiserver .Clientset .CoreV1 ().Pods (apiserver .Namespace ).GetLogs (podName , & logOptions )
154154 if req == nil {
155- log .Debug ("error in get logs for " + podName )
155+ log .Debugf ("error in get logs for %s" , podName )
156156 } else {
157- log .Debug ("got the logs for " + podName )
157+ log .Debugf ("got the logs for %s" , podName )
158158 }
159159 readCloser , err := req .Stream ()
160160 if err != nil {
@@ -171,7 +171,7 @@ func printPVCListing(clusterName, pvcName, PVCRoot string) ([]string, error) {
171171 _ , err = io .Copy (& buf2 , readCloser )
172172 log .Debugf ("backups are... \n %s" , buf2 .String ())
173173
174- log .Debug ("pvc=" + pvcName )
174+ log .Debugf ("pvc = %s" , pvcName )
175175 lines := strings .Split (buf2 .String (), "\n " )
176176 //chop off last line since its only a newline
177177 last := len (lines ) - 1
0 commit comments