From 2986227f1c26af49c9c4bf913086a0722c11e000 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 13 Mar 2023 19:36:19 +0800 Subject: [PATCH] connID to md5 --- pkg/common/db/relation/mysql_init.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/common/db/relation/mysql_init.go b/pkg/common/db/relation/mysql_init.go index 37c495b49..15c6c3099 100644 --- a/pkg/common/db/relation/mysql_init.go +++ b/pkg/common/db/relation/mysql_init.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "gorm.io/driver/mysql" - "strings" "time" "gorm.io/gorm" @@ -68,11 +67,9 @@ func NewGormDB() (*gorm.DB, error) { type Writer struct{} func (w Writer) Printf(format string, args ...interface{}) { - var s []string + var s = []string{format} for _, v := range args { s = append(s, fmt.Sprintf("%v", v)) } - log.ZDebug(context.Background(), format, "sql", strings.Join(s, "")) - fmt.Println(format) - fmt.Println(strings.Join(s, "")) + log.ZDebug(context.Background(), "msg", s) }