Customizing output format
評估
這個 Issue 還沒有評估資料。
描述
Ref #573, #565, #553, #456, #453, #402, #578, #526, #525, #488
Right now it's very clear that debug takes a subjective stance on its output format. This is unsuitable for a variety of use-cases, especially the disparity between the isatty(2) == 0 and == 1 cases.
Let's figure out how to solve this.
My initial knee-jerk idea would be to introduce a DEBUG_FORMAT environment variable. It would accept a string with delimiters similar to date-time or printf formats that indicate different elements of a debug log.
This would also remove the need for a plethora of custom environment variables that have been proposed.
We'd have a default format that would then be the same between interactive/non-interactive TTY sessions (fd 2, as always).
This would look something like
DEBUG_FORMAT="%N %m %D"
Where %N is the namespace (colored if interactive terminal), %m is the message and %D is the time diff - the exact format in the screenshot in the readme.
Of course there would be other delimiters available, and the above doesn't necessarily need to be the default, but it would solve pretty much any use-case imaginable regarding the output format in a non-subjective manner.
That's just my personal proposal, but this RFC is after any solution, so if you have a different idea please sound off below.
- 主要語言
- JavaScript
- 星號
- 11.5k
- 分支
- 993
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
debug-js/debug 的其他 Issue
-
Add documentation around using ESM imports可能已有人在做 @taronsung 於 260 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 82/100
-
難度 4/5 3-5 天 新手友好度 25/100
-
Debug as JSON未關閉
難度 5/5 一週以上 新手友好度 25/100
-
難度 3/5 1-2 天 新手友好度 35/100
-
難度 3/5 1-2 天 新手友好度 28/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
Add: EUROTV NEWS未關閉channels:add check:passed
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 65/100
-
curriculum documentation quality
難度 2/5 1-3 小時 新手友好度 78/100
githubnext/gh-aw-workshop#4638 ·
維護者通常 1 天內回覆
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
難度 2/5 1-3 小時 新手友好度 65/100
openclaw/openclaw-enterprise#2571 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆