refactor: 移除冗余日志输出并优化日志处理
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-02-02 18:32:41 +08:00
parent acc9bcf6ff
commit cdb7cec4ad
17 changed files with 59 additions and 100 deletions

View File

@@ -4,7 +4,6 @@ import (
"blazing/common/utils"
"blazing/cool"
"blazing/modules/config/model"
"context"
"fmt"
"sort"
@@ -35,7 +34,7 @@ func NewServerService() *ServerService {
subm := r[i].GMap()
if ok {
cool.Logger.Info(context.TODO(), "服务器假踢人")
err := t.KickPerson(0) //实现指定服务器踢人
if err == nil {

View File

@@ -3,7 +3,6 @@ package service
import (
"blazing/cool"
"blazing/modules/player/model"
"context"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
@@ -27,7 +26,7 @@ func NewDoneService(id uint32) *DoneService {
}
// ID
// 击杀-捕捉
// 击杀-捕捉
func (s *DoneService) UpdatePet(ptye model.PetInfo, res ...uint32) {
//属性->属性值->ID 击杀-捕捉-炫彩击杀-炫彩捕捉 雄性 雌性
@@ -51,7 +50,7 @@ func (s *DoneService) UpdatePet(ptye model.PetInfo, res ...uint32) {
func (s *DoneService) update(ptye model.EnumMilestone, args []uint32, results []uint32) {
if cool.Config.ServerInfo.IsVip != 0 {
cool.Logger.Info(context.TODO(), "测试服不消耗物品玩家数据", s.userid)
return
}
ar := gconv.String(args)

View File

@@ -180,7 +180,6 @@ func (s *InfoService) Gensession() string {
func (s *InfoService) Kick(id uint32) error {
cool.Logger.Info(context.TODO(), "服务器收到踢人")
useid1, err := share.ShareManager.GetUserOnline(id)
if err != nil {
@@ -198,7 +197,6 @@ func (s *InfoService) Kick(id uint32) error {
}
func (s *InfoService) Save(data model.PlayerInfo) {
if cool.Config.ServerInfo.IsVip != 0 {
cool.Logger.Info(context.TODO(), "测试服不保存玩家数据", s.userid)
return
}

View File

@@ -21,7 +21,7 @@ func (s *ItemService) Get(min, max uint32) []model.Item {
}
func (s *ItemService) UPDATE(id uint32, count int) {
if cool.Config.ServerInfo.IsVip != 0 && count < 0 {
cool.Logger.Info(context.TODO(), "测试服不消耗物品玩家数据", s.userid)
return
}
m := s.TestModel(s.Model)

View File

@@ -41,7 +41,7 @@ func (s *RoomService) Get(userid uint32) model.BaseHouseEx {
func (s *RoomService) Set(id []model.FitmentShowInfo) {
//todo待测试
if cool.Config.ServerInfo.IsVip != 0 {
cool.Logger.Info(context.TODO(), "测试服不消耗物品玩家数据", s.userid)
return
}
var ttt model.BaseHouseEx

View File

@@ -4,7 +4,6 @@ import (
"blazing/cool"
config "blazing/modules/config/service"
"blazing/modules/player/model"
"context"
)
type TalkService struct {
@@ -54,7 +53,7 @@ func (s *TalkService) Cheak(mapid uint32, flag int) (int, bool) {
}
func (s *TalkService) Update(flag int) {
if cool.Config.ServerInfo.IsVip != 0 {
cool.Logger.Info(context.TODO(), "测试服不消耗物品玩家数据", s.userid)
return
}
m := s.PModel(s.Model).Where("talk_id", flag)

View File

@@ -1,17 +1,15 @@
package demo
import (
"blazing/cool"
_ "blazing/modules/space/controller"
_ "blazing/modules/space/middleware"
"github.com/gogf/gf/v2/os/gctx"
"fmt"
)
func init() {
var (
ctx = gctx.GetInitCtx()
)
cool.Logger.Debug(ctx, "module space init start ...")
cool.Logger.Debug(ctx, "module space init finished ...")
// var (
// ctx = gctx.GetInitCtx()
// )
fmt.Println("module space init start ...")
fmt.Println("module space init finished ...")
}

View File

@@ -2,6 +2,7 @@ package demo
import (
_ "blazing/modules/task/packed"
"fmt"
"blazing/cool"
@@ -18,7 +19,7 @@ func init() {
taskInfo = model.NewTaskInfo()
ctx = gctx.GetInitCtx()
)
cool.Logger.Debug(ctx, "module task init start ...")
fmt.Println("module task init start ...")
cool.FillInitData(ctx, "task", taskInfo, nil)
result, err := cool.DBM(taskInfo).Where("status", 1).All()
@@ -29,6 +30,6 @@ func init() {
id := v["id"].String()
cool.RunFunc(ctx, "TaskAddTask("+id+")")
}
cool.Logger.Debug(ctx, "module task init finished ...")
fmt.Println("module task init finished ...")
}