更新日志

This commit is contained in:
白茶清欢 2023-02-12 16:07:19 +08:00
parent 6ac24e2236
commit e543df3e30
3 changed files with 4 additions and 2 deletions

View File

@ -302,5 +302,5 @@ func (dc *DBClient) GetSlave(ctx *gin.Context) *gorm.DB {
//
// Date : 3:45 PM 2021/12/24
func (dc *DBClient) getLogger(ctx *gin.Context, dbClient *gorm.DB, node string) gormLogger.Interface {
return wrapper.NewGormLoggerWithInstance(ctx, dbClient, dc.loggerInstance, node, dc.extraFieldList)
return wrapper.NewGormLoggerWithInstance(ctx, dbClient, dc.loggerInstance, dc.dbFlag+"|"+node, dc.extraFieldList)
}

2
go.mod
View File

@ -3,7 +3,7 @@ module git.zhangdeman.cn/zhangdeman/mysql
go 1.17
require (
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220626102711-013e3feb3c5b
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20230212080614-18dcfd6a90b4
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230207092929-c886ff6b20c5
github.com/gin-gonic/gin v1.8.2
github.com/pkg/errors v0.9.1

2
go.sum
View File

@ -2,6 +2,8 @@ git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220625104127-fff01c440556 h1:3YRp/u
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220625104127-fff01c440556/go.mod h1:0A5BV9pE31nuFE60TLbP7BIhhV/fcWoi+fHrcV2clJw=
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220626102711-013e3feb3c5b h1:ch0rrtFpFYsgHkTOX1Viwz0nXV5CboYPLGs5pTRoBL4=
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20220626102711-013e3feb3c5b/go.mod h1:maPH+eH8+PHplzyJMdXFe1xg1cVq2Ryzo2h/57lwiDs=
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20230212080614-18dcfd6a90b4 h1:of0mjYTMTzTlCp7F4NZuzsPUvKLBL8jzV/a7jh8wEyA=
git.zhangdeman.cn/zhangdeman/logger v0.0.0-20230212080614-18dcfd6a90b4/go.mod h1:maPH+eH8+PHplzyJMdXFe1xg1cVq2Ryzo2h/57lwiDs=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f h1:yAxxukVUdSM5wn264el+QiAEB0OBN/5H7Xw9Z6rLzUY=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220609072516-022a755fdf2f/go.mod h1:YI/XeTmrr9+8dxa4ThPkmNcEE8WHG5pZkKujpSWwIxM=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230207092929-c886ff6b20c5 h1:7ZFTQrOOFuG0A/UryOfqDLfmYjVjBCIgr+UvRLvJL3U=