fix(logging): 調整正式版日誌門檻#41
Merged
Merged
Conversation
Release 預設只寫入 Warning 以上,Debug 與測試主機保留 Info 診斷。 同步調整 GameInput、震動與單實例診斷等級,並補上 LoggerService 與 GameInput 日誌邊界測試。
Contributor
There was a problem hiding this comment.
Pull request overview
此 PR 調整 InputBox 在 Release 預設只寫入 Warning 以上 的日誌策略,保留 Debug / 測試主機的 Info 診斷,同步收斂 GameInput、震動與單實例相關診斷的等級,並補上日誌門檻/邊界的測試與工程文件。
Changes:
LoggerService新增日誌等級(Info/Warning/Error)與INPUTBOX_LOG_LEVEL覆寫機制,Release 預設門檻為 Warning。- 調整單實例、GameInput probe/diag、震動失敗等路徑的 log level(必要診斷升級為 Warning)。
- 新增/擴充測試覆蓋
LoggerService與 GameInput Release 日誌邊界,並更新工程文件與測試清單。
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/InputBox.Tests/README.md | 更新測試清單描述與合計數,反映新增的日誌門檻/邊界測試。 |
| tests/InputBox.Tests/LoggerServiceTests.cs | 新增 Release-like 門檻解析、環境變數覆寫與寫入邊界測試,並加入測試用暫存 log 檔清理。 |
| tests/InputBox.Tests/GameInputDirectUsageTests.cs | 新增 GameInput 診斷原因分級(Info vs Warning)的邊界測試。 |
| src/InputBox/Program.cs | 單實例 fallback suppressed 路徑升級為 Warning,保留 detail 診斷。 |
| src/InputBox/Core/Services/LoggerService.cs | 引入 LogLevel、LogWarning/LogError、門檻解析與 ShouldWrite 寫入判斷。 |
| src/InputBox/Core/Services/FeedbackService.cs | 震動派送失敗新增 Warning 診斷。 |
| src/InputBox/Core/Input/XInputGamepadController.cs | 震動 API 失敗路徑提升為 Warning(Release 可見)。 |
| src/InputBox/Core/Input/GameInputGamepadController.cs | GameInput probe/diag 依可行動性調整 Info/Warning,震動失敗改為 Warning。 |
| docs/engineering/gamepad-api.md | 補充 GameInput Release 日誌邊界規範。 |
| docs/engineering/core-engineering.md | 明文化 Release 日誌門檻與「可行動診斷原則」。 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
快取 Debug 與測試主機判斷,避免每次寫入日誌時重複掃描程序與已載入組件。 同步統一 GameInput 日誌邊界測試命名,回應 PR review。
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.
Release 預設只寫入 Warning 以上,Debug 與測試主機保留 Info 診斷。
同步調整 GameInput、震動與單實例診斷等級,並補上 LoggerService 與 GameInput 日誌邊界測試。