#18825: fix(zalo): replace console.log/error with runtime logging
channel: zalo
size: XS
trusted-contributor
Cluster:
Hooks and UI Fixes
Using console methods directly bypasses the structured logging system and runtime controls (like verbose mode).
Fix: Replace console.log/error with runtime.log/error and logVerbose helper.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Replaces the last 4 direct `console.log`/`console.error` calls in the Zalo extension's monitor module with the structured logging system (`runtime.error?.()` for errors, `logVerbose()` for informational messages). This aligns the Zalo extension with the standard logging patterns used across other extensions (msteams, matrix) and ensures all log output respects runtime controls like verbose mode.
- 2 `console.error` calls converted to `runtime.error?.()` with `String(err)` serialization (consistent with existing error logging in the same file)
- 2 `console.log` calls converted to `logVerbose(core, runtime, ...)` which gates output behind `core.logging.shouldLogVerbose()`
- No remaining `console.*` calls in `extensions/zalo/src/monitor.ts` after this change
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it is a minimal, mechanical logging migration with no behavioral changes.
- All 4 changes follow the exact same patterns already established in the file and across other extensions. The `logVerbose` helper and `runtime.error?.()` calls are well-tested conventions. No logic, control flow, or error handling behavior is altered. No remaining direct console calls in the file.
- No files require special attention
<sub>Last reviewed commit: e97dc7d</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#18841: fix(feishu): replace console.log with runtime log for typing indica...
by Clawborn · 2026-02-17
83.8%
#18858: fix(nextcloud-talk): replace console.log with runtime logging
by Clawborn · 2026-02-17
81.4%
#19103: fix(voice-call): replace console.log with runtime logging
by Clawborn · 2026-02-17
79.8%
#23669: refactor(logging): migrate node-host and tailscale console calls to...
by kevinWangSheng · 2026-02-22
74.8%
#9425: refactor(agents): replace console.warn with SubsystemLogger in comp...
by dinakars777 · 2026-02-05
72.9%
#11549: lint: add no-console rule and migrate 5 files to structured logger
by vaibhavtupe · 2026-02-08
72.0%
#19611: fix: use local timezone in log file and console timestamps
by tag-assistant · 2026-02-18
71.9%
#9974: refactor(agents): replace console.warn with SubsystemLogger in comp...
by dinakars777 · 2026-02-05
71.8%
#8617: fix: truncate large console payloads before writing to file log
by dbottme · 2026-02-04
71.5%
#3392: fix(hooks): remove debug console.log statements from session-memory...
by WinJayX · 2026-01-28
70.6%