1.重构websocket连接

This commit is contained in:
2026-05-27 10:28:39 +08:00
parent a7c2a29764
commit 8f5ba977a4
12 changed files with 1101 additions and 144 deletions

View File

@@ -29,4 +29,26 @@ return [
]
],
],
/**
* 游戏 WebSocket 推送链路专用日志(独立通道):
* - 写入 runtime/logs/ws-YYYY-MM-DD.log保留 7 天
* - 通过 Log::channel('ws')->info(...) 访问
* - 记录维度publish 入队、queue 消费、按 topic/user_id 分发、心跳与连接生命周期、握手鉴权失败等
*/
'ws' => [
'handlers' => [
[
'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [
runtime_path() . '/logs/ws.log',
7,
Monolog\Logger::DEBUG,
],
'formatter' => [
'class' => Monolog\Formatter\LineFormatter::class,
'constructor' => [null, 'Y-m-d H:i:s', true],
],
],
],
],
];