chore: Update README.md#1
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.