调整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
@@ -7,7 +7,6 @@ import (
"go-admin/app/admin/service"
"go-admin/common/apis"
"go-admin/common/dto"
"go-admin/common/global"
"go-admin/tools/app"
)
@@ -33,7 +32,7 @@ func (e *SysJob) RemoveJobForService(c *gin.Context) {
s := service.SysJob{}
s.Log = log
s.Orm = db
s.Cron = global.Runtime.GetCrontabKey(c.Request.Host)
s.Cron = app.Runtime.GetCrontabKey(c.Request.Host)
err = s.RemoveJob(&v)
if err != nil {
log.Errorf("RemoveJob error, %s", err.Error())
@@ -61,7 +60,7 @@ func (e *SysJob) StartJobForService(c *gin.Context) {
s := service.SysJob{}
s.Orm = db
s.Log = log
s.Cron = global.Runtime.GetCrontabKey(c.Request.Host)
s.Cron = app.Runtime.GetCrontabKey(c.Request.Host)
err = s.StartJob(&v)
if err != nil {
log.Errorf("GetCrontabKey error, %s", err.Error())