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

@@ -10,7 +10,6 @@ import (
_ "blazing/modules/task/middleware"
"blazing/modules/task/model"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
)
@@ -19,7 +18,7 @@ func init() {
taskInfo = model.NewTaskInfo()
ctx = gctx.GetInitCtx()
)
g.Log().Debug(ctx, "module task init start ...")
cool.Loger.Debug(ctx, "module task init start ...")
cool.FillInitData(ctx, "task", taskInfo, nil)
result, err := cool.DBM(taskInfo).Where("status", 1).All()
@@ -30,6 +29,6 @@ func init() {
id := v["id"].String()
cool.RunFunc(ctx, "TaskAddTask("+id+")")
}
g.Log().Debug(ctx, "module task init finished ...")
cool.Loger.Debug(ctx, "module task init finished ...")
}