调整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

+5 -5
View File
@@ -2,6 +2,7 @@ package tools
import (
"bytes"
"go-admin/common/apis"
"net/http"
"text/template"
@@ -9,14 +10,13 @@ import (
"go-admin/app/admin/models"
"go-admin/app/admin/models/tools"
"go-admin/pkg/logger"
tools2 "go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/config"
)
func Preview(c *gin.Context) {
log := logger.GetRequestLogger(c)
log := apis.GetRequestLogger(c)
table := tools.SysTables{}
id, err := tools2.StringToInt(c.Param("tableId"))
tools2.HasError(err, "", -1)
@@ -69,7 +69,7 @@ func Preview(c *gin.Context) {
}
func GenCodeV3(c *gin.Context) {
log := logger.GetRequestLogger(c)
log := apis.GetRequestLogger(c)
table := tools.SysTables{}
id, err := tools2.StringToInt(c.Param("tableId"))
tools2.HasError(err, "", -1)
@@ -192,7 +192,7 @@ func ActionsGenV3(tab tools.SysTables) {
}
func GenMenuAndApi(c *gin.Context) {
log := logger.GetRequestLogger(c)
log := apis.GetRequestLogger(c)
table := tools.SysTables{}
timeNow := tools2.GetCurrentTime()
@@ -433,4 +433,4 @@ func GenMenuAndApi(c *gin.Context) {
ADelete.MenuId, err = ADelete.Create(db)
app.OK(c, "", "数据生成成功!")
}
}