refactor(cool): 修复Logger变量名拼写错误

将全局Logger变量从Loger修正为Logger,统一日志实例命名规范,
确保所有模块中日志记录的一致性。

BREAKING CHANGE: 全局日志实例变量名从Loger改为Logger
```
This commit is contained in:
2025-12-25 12:14:04 +08:00
parent ff199e339f
commit 164e70519f
30 changed files with 85 additions and 85 deletions

View File

@@ -24,7 +24,7 @@ type ServerHandler struct{}
// 实现踢人
func (h *ServerHandler) Kick(ctx context.Context, userid uint32) error {
cool.Loger.Info(context.TODO(), "服务器收到踢人")
cool.Logger.Info(context.TODO(), "服务器收到踢人")
useid1, err := share.ShareManager.GetUserOnline(userid)
if err != nil {
@@ -43,7 +43,7 @@ func (h *ServerHandler) Kick(ctx context.Context, userid uint32) error {
// 注册logic服务器
func (h *ServerHandler) RegisterLogic(ctx context.Context, id, port uint16) error {
cool.Loger.Debug(context.Background(), "注册logic服务器", id, port)
cool.Logger.Debug(context.Background(), "注册logic服务器", id, port)
//TODO 待修复滚动更新可能导致的玩家可以同时在旧服务器和新服务器同时在线的bug
revClient, ok := jsonrpc.ExtractReverseClient[cool.ClientHandler](ctx)
@@ -67,13 +67,13 @@ func StartServer() {
rpcServer := jsonrpc.NewServer(jsonrpc.WithReverseClient[cool.ClientHandler](""))
rpcServer.Register("", &ServerHandler{})
cool.Loger.Debug(context.Background(), "jsonrpc server start", rpcport)
cool.Logger.Debug(context.Background(), "jsonrpc server start", rpcport)
// go time.AfterFunc(3000, func() {
// testjsonrpc()
// })
err := http.ListenAndServe("0.0.0.0:"+rpcport, rpcServer)
cool.Loger.Debug(context.Background(), "jsonrpc server fail", err)
cool.Logger.Debug(context.Background(), "jsonrpc server fail", err)
}
var closer jsonrpc.ClientCloser