Repository navigation
docs: add JSDoc to Logger and document why it logs to stderr - #9077
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The documentation accurately reflects the existing implementation and introduces no runtime changes.
Review effort: Balanced
Findings: None
What changed in this PR
Documents logger behavior and explains why all log levels use stderr without changing runtime behavior.
Changes:
- Adds JSDoc for logger levels, methods, and singleton.
- Documents stderr usage to preserve wrapped-command stdout.
| File | Description |
|---|---|
src/logger.ts |
Adds accurate JSDoc for logger behavior and stderr rationale. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ Copilot review passed with no inline comments. @copilot Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
🚀 Security Guard has started processing this pull request |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
✅ Smoke Claude passed
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟
|
|
✅ Build Test Suite completed successfully!
|
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
Smoke Test: Claude Engine Validation
Overall result: ✅ PASS
|
|
Smoke Test: Copilot Engine —
Overall: PASS
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS
|
Smoke Test: Cloud Hypervisor + Copilot
Overall: FAIL (check 2 could not confirm an allowed egress response; curl itself was denied at the tool level rather than returning an HTTP status).
|
|
✅ Smoke Test: Copilot BYOK (Direct) Mode
Status: PASS — Direct BYOK mode (COPILOT_PROVIDER_API_KEY) operating correctly. cc
|
Smoke Test: Services Connectivity
Overall: PASS
|
Chroot Version Comparison Results
|
|
📡 OTel Tracing Smoke Test Results
Summary: All 5 scenarios validated successfully. No regressions detected in OTEL tracing, token-attribute propagation, or OTLP export path.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Notes:
|
src/logger.tshad no JSDoc. The issue also asked why every level callsconsole.errorinstead ofconsole.info,console.warnandconsole.debug. This PR adds JSDoc and keeps theconsole.errorcalls on purpose. It only adds comments; runtime behaviour is unchanged.Changes
LOG_LEVELS, theLoggerclass and constructor,setLevel, the privateshouldLog, every level method (prefix, colour, threshold) and the exportedloggersingleton.console.infoandconsole.debugwrite to stdout.awfwraps a user command whose stdout is often piped or parsed, so logs must not mix into it. Sending every level to stderr keeps stdout clean.