feat: CLI 日志默认显示用户视角,新增 --verbose 标志#24
Merged
Merged
Conversation
日志显示从"代理调试视角"改为"用户使用视角": - 默认格式: [HH:MM:SS.mmm] status (provider, key: name, 1234ms) method/URL/retry=0 默认隐藏 - --verbose 标志恢复完整格式: [HH:MM:SS.mmm] provider METHOD url -> ... - 提取 formatLogLine 纯函数便于测试,覆盖 8 种场景 - 新增 --verbose 标志注册测试 不修改 LogEntry 结构体、/logs API 或 LogStore,存储层完全不变。 向后兼容:--verbose 标志可选,默认行为改变无需调用方调整。
bigmanBass666
marked this pull request as ready for review
July 15, 2026 14:45
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.
变更内容
akswitch logs命令的显示从"代理调试视角"改为"用户使用视角"。默认显示(新)
Verbose 显示(原格式)
akswitch logs --verbose恢复完整调试信息架构
formatLogLine()纯函数,纯字符串格式化,可独立单元测试测试
go vet干净检查清单
make test-all全量通过go build ./cmd/akswitch/编译通过