Skip to content

feat: stdout 精简模式 — akswitch start --log-format=compact#33

Merged
bigmanBass666 merged 1 commit into
mainfrom
feature/stdout-compact-mode
Jul 16, 2026
Merged

feat: stdout 精简模式 — akswitch start --log-format=compact#33
bigmanBass666 merged 1 commit into
mainfrom
feature/stdout-compact-mode

Conversation

@bigmanBass666

Copy link
Copy Markdown
Contributor

为 ak switch start 新增 --log-format 标志 (default|compact)。

新增 --log-format 标志,支持 default(完整格式)和 compact(精简):
- proxy request → [22:45:53] → POST /v1/messages (392KB)
- proxy success → [22:45:53] 200 sensenova (key: name)
- non-retryable client error → [22:45:53] ✗ 400 POST /v1/messages
- 其他消息保持原样

文件日志不受影响,始终保持完整格式。
@bigmanBass666
bigmanBass666 marked this pull request as ready for review July 16, 2026 17:37
@bigmanBass666
bigmanBass666 merged commit 47ebb5e into main Jul 16, 2026
4 checks passed
@bigmanBass666
bigmanBass666 deleted the feature/stdout-compact-mode branch July 16, 2026 17:37
bigmanBass666 pushed a commit that referenced this pull request Jul 16, 2026
Python 替换因 CRLF 行尾不匹配,init() 中缺少
startCmd.Flags().String("log-format", ...) 注册行。
bigmanBass666 added a commit that referenced this pull request Jul 16, 2026
* fix: 补上 --log-format 标志注册(PR #33 遗漏)

Python 替换因 CRLF 行尾不匹配,init() 中缺少
startCmd.Flags().String("log-format", ...) 注册行。

* test: 新增 --log-format 标志注册测试

* chore: 清理 go.mod 中未使用的 spf13/viper 直接依赖及其间接依赖链(13个包,33行)

---------

Co-authored-by: wingIsCrazy <wingiscrazy@qq.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