Skip to content

chore: Update README.md#1

Merged
maninhill merged 1 commit into
mainfrom
maninhill-patch-1
Apr 21, 2025
Merged

chore: Update README.md#1
maninhill merged 1 commit into
mainfrom
maninhill-patch-1

Conversation

@maninhill

Copy link
Copy Markdown
Contributor

No description provided.

@maninhill
maninhill merged commit 0761919 into main Apr 21, 2025
@maninhill
maninhill deleted the maninhill-patch-1 branch April 21, 2025 07:25
hyperbolic-c added a commit to hyperbolic-c/SQLBot that referenced this pull request Jan 17, 2026
添加以下位置的详细日志:
1. AlgorithmEngine.run() - 记录每个事件生成
   - [EVENT #{n}] 前缀标记每个事件
   - 记录事件类型和数据

2. BusinessDBService.process() - 记录每个 SSE 事件
   - [SSE OUT #{n}] 前缀标记每个输出事件
   - 记录完整的 SSE 数据

3. stream_sql_new - 记录 SSE 输出
   - 记录事件类型、完整事件数据、SSE 格式

日志格式示例:
[AlgorithmEngine] [EVENT dataease#1] 生成 id 事件: record_id=123
[AlgorithmEngine] [EVENT dataease#2] 生成 question 事件
[BusinessDBService] [SSE OUT dataease#1] {"type":"id","id":123}
[stream_sql_new] SSE 事件类型: id
[stream_sql_new] SSE 完整数据: {"type":"id","id":123}

这样可以追踪:
1. 算法层生成的事件数量和顺序
2. 业务数据层输出的 SSE 事件
3. API 层输出的 SSE 响应

影响文件:
- backend/apps/algorithm/engine.py
- backend/apps/business_db/service.py
- backend/apps/chat/api/chat.py

Co-Authored-By: Claude <noreply@anthropic.com>
hyperbolic-c added a commit to hyperbolic-c/SQLBot that referenced this pull request Jan 17, 2026
1. 新增 SSEDebugLogUtil 工具类
   - 输出到 logs/debug.log 文件
   - 专门用于 SSE 事件调试

2. 修改的文件:
   - common/utils/utils.py - 添加 SSEDebugLogUtil 和 sse_debug 日志处理器
   - apps/algorithm/engine.py - 使用 SSEDebugLogUtil 输出事件生成日志
   - apps/business_db/service.py - 使用 SSEDebugLogUtil 输出 SSE 事件日志
   - apps/chat/api/chat.py - 使用 SSEDebugLogUtil 输出 SSE 响应日志

日志格式示例:
[SSE DEBUG] ========== AlgorithmEngine.run 开始 ==========
[SSE DEBUG] record_id=123, in_chat=True, finish_step=GENERATE_CHART
[SSE DEBUG] [EVENT dataease#1] 生成 id 事件: record_id=123
[SSE DEBUG] [EVENT dataease#2] 生成 question 事件
[SSE DEBUG] [SSE OUT dataease#1] {"type":"id","id":123}
[SSE DEBUG] ========== stream_sql_new SSE 输出 ==========
[SSE DEBUG] 事件类型: id
[SSE DEBUG] SSE 格式: "data: {\"type\":\"id\",\"id\":123}\n\n"

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant