mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 18:20:50 +00:00
feat : Log optimization
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
"github.com/google/uuid"
|
||||
"go-admin/global"
|
||||
"go-admin/models"
|
||||
"go-admin/tools"
|
||||
"go-admin/tools/app"
|
||||
@@ -209,7 +210,7 @@ func InsetSysUserAvatar(c *gin.Context) {
|
||||
guid := uuid.New().String()
|
||||
filPath := "static/uploadfile/" + guid + ".jpg"
|
||||
for _, file := range files {
|
||||
tools.Logger.Println(file.Filename)
|
||||
global.Logger.Debug(file.Filename)
|
||||
// 上传文件至指定目录
|
||||
_ = c.SaveUploadedFile(file, filPath)
|
||||
}
|
||||
|
||||
+5
-4
@@ -3,6 +3,7 @@ package tools
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go-admin/global"
|
||||
"go-admin/models"
|
||||
"go-admin/models/tools"
|
||||
tools2 "go-admin/tools"
|
||||
@@ -116,17 +117,17 @@ func GenCode(c *gin.Context) {
|
||||
NewText: newText,
|
||||
}
|
||||
if helper.OldText == helper.NewText {
|
||||
tools2.Logger.Println("error !! the NewText isEqual the OldText")
|
||||
global.Logger.Println("error !! the NewText isEqual the OldText")
|
||||
return
|
||||
}
|
||||
if err := helper.DoWrok(); err != nil {
|
||||
tools2.Logger.Print("error:", err.Error())
|
||||
global.Logger.Print("error:", err.Error())
|
||||
|
||||
} else {
|
||||
tools2.Logger.Print("done!")
|
||||
global.Logger.Print("done!")
|
||||
}
|
||||
|
||||
app.OK(c, "", "代码生成成功!")
|
||||
app.OK(c, "", "Code generated successfully!")
|
||||
}
|
||||
|
||||
func GenMenuAndApi(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user