← Back to PRs

#9974: refactor(agents): replace console.warn with SubsystemLogger in compaction-safeguard.ts

by dinakars777 open 2026-02-05 23:16 View on GitHub →
agents size: XS
Refactors `src/agents/pi-extensions/compaction-safeguard.ts` to use the standardized `SubsystemLogger` instead of `console.warn` for improved logging control and consistency. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR refactors `src/agents/pi-extensions/compaction-safeguard.ts` to route warning output through the shared logging system by introducing a subsystem logger (`createSubsystemLogger("agents/compaction-safeguard")`) and replacing three `console.warn(...)` calls with `log.warn(...)`. This aligns the compaction safeguard extension’s diagnostics with the rest of the repo’s structured, configurable logging. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Change is a straightforward logging refactor (console.warn -> SubsystemLogger.warn) using an existing, repo-standard API, with no behavioral changes to compaction logic beyond log routing/formatting. - No files require special attention <!-- greptile_other_comments_section --> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs