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

@@ -1,11 +1,8 @@
package entity
import (
"context"
"github.com/gobwas/ws"
"github.com/gobwas/ws/wsutil"
"github.com/gogf/gf/v2/frame/g"
"github.com/panjf2000/gnet/v2"
"github.com/panjf2000/gnet/v2/pkg/logging"
)
@@ -29,7 +26,7 @@ func (c *Conn) SendPack(bytes []byte) error {
_, err := c.MainConn.Write(bytes)
if err != nil {
g.Log().Error(context.Background(), err)
logging.Error( err)
}
}