mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-31 01:35:56 +08:00
treewide: 避免使用fmt.Print记录日志
This commit is contained in:
@@ -16,8 +16,6 @@ package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"yunion.io/x/log"
|
||||
@@ -33,23 +31,19 @@ import (
|
||||
func InitAuth(options *common_options.CommonOptions, authComplete auth.AuthCompletedCallback) {
|
||||
|
||||
if len(options.AuthURL) == 0 {
|
||||
fmt.Println("Missing AuthURL")
|
||||
os.Exit(1)
|
||||
log.Fatalln("Missing AuthURL")
|
||||
}
|
||||
|
||||
if len(options.AdminUser) == 0 {
|
||||
fmt.Println("Mising AdminUser")
|
||||
os.Exit(1)
|
||||
log.Fatalln("Mising AdminUser")
|
||||
}
|
||||
|
||||
if len(options.AdminPassword) == 0 {
|
||||
fmt.Println("Missing AdminPasswd")
|
||||
os.Exit(1)
|
||||
log.Fatalln("Missing AdminPasswd")
|
||||
}
|
||||
|
||||
if len(options.AdminProject) == 0 {
|
||||
fmt.Println("Missing AdminProject")
|
||||
os.Exit(1)
|
||||
log.Fatalln("Missing AdminProject")
|
||||
}
|
||||
|
||||
a := auth.NewAuthInfo(
|
||||
|
||||
@@ -77,7 +77,7 @@ func CheckSync(autoSync bool) bool {
|
||||
}
|
||||
} else {
|
||||
for _, sql := range dropFKSqls {
|
||||
fmt.Println(sql)
|
||||
log.Infof("%s;", sql)
|
||||
}
|
||||
inSync = false
|
||||
}
|
||||
@@ -96,7 +96,7 @@ func CheckSync(autoSync bool) bool {
|
||||
}
|
||||
} else {
|
||||
for _, sql := range sqls {
|
||||
fmt.Println(sql)
|
||||
log.Infof("%s;", sql)
|
||||
}
|
||||
inSync = false
|
||||
}
|
||||
|
||||
@@ -163,7 +163,6 @@ func lbGetBackendGroupCheckStatus(ctx context.Context, userCred mcclient.TokenCr
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
fmt.Printf("idx: %d\n", i)
|
||||
backendJson := backendJsons[i].(*jsonutils.JSONDict)
|
||||
for j, colName := range resSeries.Columns {
|
||||
colVal := resColumns[j]
|
||||
|
||||
Reference in New Issue
Block a user