"refactor(logging): 移除调试打印语句,使用gf日志框架记录错误信息"

This commit is contained in:
1
2025-07-26 03:15:58 +00:00
parent 459a779591
commit dcc5ef047c
3 changed files with 5 additions and 5 deletions

View File

@@ -1,10 +1,11 @@
package entity
import (
"fmt"
"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"
)
@@ -28,7 +29,8 @@ func (c *Conn) SendPack(bytes []byte) error {
_, err := c.MainConn.Write(bytes)
if err != nil {
fmt.Println(err)
g.Log().Error(context.Background(), err)
}
}
return nil