feat: add logging module for backend + frontend error reporting
Backend: - New Logger utility (app/utils/Logger.php) with category-based log files (connect/game/bet/error/frontend under runtime/log/) - Log WebSocket connect/close events (WsConnect, WsClose) - Log dealer auth success/failure (SpaceConnectService) - Log all game events: startBet, endBet, changeBoot, opening for all 7 game types - Log unhandled exceptions (ExceptionHandle) - Separate SQL/error logs via apart_level, enable realtime_write for Swoole - Add /log/report POST endpoint for frontend error ingestion Frontend: - New error-report.js with window.onerror + unhandledrejection auto-reporting - Added to all 12 dealer HTML templates - Bump VERSION_V to v10.1.0
This commit is contained in:
+3
-3
@@ -25,9 +25,9 @@ return [
|
||||
// 单文件日志写入
|
||||
'single' => false,
|
||||
// 独立日志级别
|
||||
'apart_level' => [],
|
||||
'apart_level' => ['error', 'sql'],
|
||||
// 最大日志文件数量
|
||||
'max_files' => 0,
|
||||
'max_files' => 30,
|
||||
// 使用JSON格式记录
|
||||
'json' => false,
|
||||
// 日志处理
|
||||
@@ -37,7 +37,7 @@ return [
|
||||
// 日志输出格式化
|
||||
'format' => '[%s][%s] %s',
|
||||
// 是否实时写入
|
||||
'realtime_write' => false,
|
||||
'realtime_write' => true,
|
||||
],
|
||||
// 其它日志通道配置
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user