refactor(logging): 统一使用自定义Loger替代g.Log()日志记录

This commit is contained in:
1
2025-07-26 03:48:06 +00:00
parent dcc5ef047c
commit 5d2b48ccc0
26 changed files with 72 additions and 73 deletions

View File

@@ -32,7 +32,7 @@ func NewTaskInfoService() *TaskInfoService {
}
func (s *TaskInfoService) ModifyAfter(ctx g.Ctx, method string, param g.MapStrAny) (err error) {
g.Log().Info(ctx, "TaskInfoService.ModifyAfter", method, param)
cool.Loger.Info(ctx, "TaskInfoService.ModifyAfter", method, param)
if method == "Add" {
if gconv.Int(param["status"]) == 1 {
id, err := cool.DBM(s.Model).Where("name", param["name"]).Value("id")
@@ -146,7 +146,7 @@ func (s *TaskInfoService) Log(ctx g.Ctx, param g.MapStrStr) (data interface{}, e
},
}, nil
}
// g.Log().Info(ctx, "TaskInfoService.Log", result)
// Loger.Info(ctx, "TaskInfoService.Log", result)
data = g.Map{
"list": result,
"pagination": g.Map{
@@ -169,7 +169,7 @@ func (s *TaskInfoService) SetNextRunTime(ctx g.Ctx, cronId string, cron string)
return err
}
} else {
g.Log().Debug(ctx, "获取下次执行时间失败", e)
cool.Loger.Debug(ctx, "获取下次执行时间失败", e)
}
return nil