优化日志

This commit is contained in:
hahwu 2026-03-31 11:45:09 +08:00
parent b74011e5fb
commit 6e3ddfa4e2
2 changed files with 2 additions and 1 deletions

View File

@ -4,4 +4,5 @@ const (
Go_gc_percent = 200
Go_gc_memory_limit = 1024 << 20
Go_game_version = "1.0.3" // 游戏版本号,格式为 "主版本号.次版本号.修订号",每次发布新版本时需要更新
Go_log_delete_days = 3 // 日志删除天数,超过这个天数的日志文件将被删除
)

View File

@ -602,7 +602,7 @@ func (ad *GameLogic) CreateDailyLogFile() {
fmt.Println(err)
}
log.Debug("CreateDailyLogFile")
ad.RemoveOldLogs(15)
ad.RemoveOldLogs(MergeConst.Go_log_delete_days)
}
func (ad *GameLogic) RemoveOldLogs(days int) {