package test
import (
"context"
"git.cht-group.net/cht-group-go/engine/tracex"
"git.cht-group.net/cht-group-go/ormx"
"testing"
"time"
)
func TestOrmTrace(t *testing.T) {
lg := ormx.NewLog("info")
//设置回调函数
lg.SetTrace(tracex.OrmTrace)
//打开开关
//ormx.JaegerEnable = true
lg.Trace(context.Background(), time.Now().Add(time.Millisecond*-100), func() (sql string, rowsAffected int64) {
return "select * from users limit 10", 10
}, nil)
}
-
Notifications
You must be signed in to change notification settings - Fork 0
go-zero db change to gorm
License
go-libraries/ormx
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
go-zero db change to gorm
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published