fix: 移除 enable_logging 错误拦截#1920
Conversation
|
失误关闭的PR 操作失误把上个pr关闭了,现在已rebase好重新提交。 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0393e08d3c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
问题描述: - 使用统计(Usage Statistics)在关闭"启用日志记录"开关后不再记录到数据库 - 这是因为 bf40b01 提交错误地同时跳过了使用统计记录 修复内容: - 移除 response_processor.rs 中两处对 enable_logging 的检查,让使用统计始终记录
0393e08 to
f9d6357
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
farion1231
left a comment
There was a problem hiding this comment.
[P1] 这个 PR 修复了“统计不再入库”,但同时也把“关闭日志后不再持久化代理请求”这层语义一起撤销了。PR 删除了 response_processor.rs (line 404) 和 response_processor.rs (line 472) 两处 enable_logging 早退;而实际写入仍然走 logger.rs (line 76) 的 INSERT OR REPLACE INTO proxy_request_logs。问题在于“请求日志”页后台查询同样直接读取这张表,而且没有按配置或数据源过滤,见 usage_stats.rs (line 615) 和 usage_stats.rs (line 681)。也就是说,用户一旦关闭“启用日志记录”,这个 PR 仍会继续把代理请求写回来,并在 Request Logs 页重新展示

问题描述
使用统计(Usage Statistics)在升级到某个版本后不再记录到数据库 proxy_request_logs 表中。
问题原因
提交: bf40b01
这个提交本意是:当用户关闭"启用日志记录"开关时,跳过 HTTP请求详情的日志写入。但同时跳过了使用统计记录,导致未开启日志记录时,使用统计无法记录。
问题代码
修复内容
的检查,让使用统计始终记录,不受日志开关影响
测试计划