调整log代码,兼容zap扩展支持fields

This commit is contained in:
linwenxiang committed 2021-03-05 15:13:36 +08:00
1 parent 39dd1ee6f8
commit 75711922b4
47 files changed
+267 -275

No files matched your search

+2 -3
View File
@@ -2,11 +2,10 @@ package middleware
import (
"github.com/gin-gonic/gin"
"go-admin/common/global"
"go-admin/tools/app"
)
func WithContextDb(c *gin.Context) {
c.Set("db", global.Runtime.GetDbByKey(c.Request.Host))
c.Set("db", app.Runtime.GetDbByKey(c.Request.Host))
c.Next()
}