← Back to PRs

#19103: fix(voice-call): replace console.log with runtime logging

by Clawborn open 2026-02-17 11:29 View on GitHub →
channel: nextcloud-talk channel: voice-call channel: zalo channel: feishu size: S trusted-contributor
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