← Back to PRs

#18825: fix(zalo): replace console.log/error with runtime logging

by Clawborn open 2026-02-17 03:30 View on GitHub →
channel: zalo size: XS trusted-contributor
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