#19103: fix(voice-call): replace console.log with runtime logging
channel: nextcloud-talk
channel: voice-call
channel: zalo
channel: feishu
size: S
trusted-contributor
Cluster:
Hooks and UI Fixes
Voice call events and outbound logging were using console methods, bypassing structured logs.
Injected logger into CallManager and event contexts, updated tests to mock logger.
Also replaced console.log/error in feishu, nextcloud-talk, and zalo extensions.
Recreated from #18879 with only relevant files (no import reordering noise).
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Replaces `console.log`/`console.error`/`console.warn` with structured runtime logging across voice-call, feishu, nextcloud-talk, and zalo extensions. In the voice-call extension, a `Logger` type is introduced in `manager/context.ts` and injected into `CallManager` via constructor, then threaded through `CallManagerContext` to `events.ts`. Feishu, nextcloud-talk, and zalo extensions use their existing runtime logging patterns (`runtime?.log`, `getNextcloudTalkRuntime().logging.getChildLogger()`, `logVerbose()`). Tests are properly updated with mock loggers.
- The voice-call `manager/events.ts` is fully migrated, but sibling files in the same `manager/` directory (`outbound.ts`, `timers.ts`, `store.ts`) still use `console.*` calls. This is noted in inline comments — it may be intentional scoping for this PR but worth addressing in a follow-up.
- Import reordering in several files is cosmetic (type imports before value imports).
- All changes are backwards-compatible: `runtime.ts` provides a console-based fallback logger when none is supplied.
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge — changes are straightforward logging replacements with no behavioral or logic changes.
- Score of 4 reflects clean, well-tested logging migration with one minor gap: several files in the same `manager/` directory still use `console.*` instead of the newly introduced logger. No logic or security issues.
- `extensions/voice-call/src/manager/outbound.ts` and `extensions/voice-call/src/manager/timers.ts` still use `console.*` and should be converted in a follow-up.
<sub>Last reviewed commit: 04f6429</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#18858: fix(nextcloud-talk): replace console.log with runtime logging
by Clawborn · 2026-02-17
80.4%
#18825: fix(zalo): replace console.log/error with runtime logging
by Clawborn · 2026-02-17
79.8%
#18841: fix(feishu): replace console.log with runtime log for typing indica...
by Clawborn · 2026-02-17
77.8%
#18852: fix: Voice-call state persistence is fire-and-forget, causing silen...
by coygeek · 2026-02-17
77.7%
#23669: refactor(logging): migrate node-host and tailscale console calls to...
by kevinWangSheng · 2026-02-22
77.4%
#21566: feat(voice-call): bridge call transcripts to main agent session
by MegaPhoenix92 · 2026-02-20
73.9%
#9760: fix(voice-call): discard stale calls on plugin restart
by leszekszpunar · 2026-02-05
73.3%
#11549: lint: add no-console rule and migrate 5 files to structured logger
by vaibhavtupe · 2026-02-08
73.2%
#9425: refactor(agents): replace console.warn with SubsystemLogger in comp...
by dinakars777 · 2026-02-05
72.8%
#19611: fix: use local timezone in log file and console timestamps
by tag-assistant · 2026-02-18
72.3%