Overview
The project has a well-implemented Pino-based logging system in src/lib/logging/index.ts, but at least 13 files bypass it in favor of raw console.* calls. Console output is not structured, not captured by the log aggregator, and cannot be correlated with request IDs or filtered by log level in production.
Specifications
Features:
- All log output goes through
createLogger() from src/lib/logging/index.ts
- No
console.log, console.error, or console.warn calls exist in production code paths
Tasks:
- Run
grep -rn console\. src/ --include=*.ts --include=*.tsx to find all occurrences
- Replace each call with the appropriate logger method
- Add an ESLint rule
no-console: error to .eslintrc.json to prevent regression
- Allow
console.* only in scripts and test files via .eslintignore
Impacted Files:
- All
src/ files containing console.log, console.error, or console.warn
.eslintrc.json
Acceptance Criteria
- Zero
console.* calls remain in src/ production code
- The ESLint rule prevents future regressions
Overview
The project has a well-implemented Pino-based logging system in
src/lib/logging/index.ts, but at least 13 files bypass it in favor of rawconsole.*calls. Console output is not structured, not captured by the log aggregator, and cannot be correlated with request IDs or filtered by log level in production.Specifications
Features:
createLogger()fromsrc/lib/logging/index.tsconsole.log,console.error, orconsole.warncalls exist in production code pathsTasks:
grep -rn console\. src/ --include=*.ts --include=*.tsxto find all occurrencesno-console: errorto.eslintrc.jsonto prevent regressionconsole.*only in scripts and test files via.eslintignoreImpacted Files:
src/files containingconsole.log,console.error, orconsole.warn.eslintrc.jsonAcceptance Criteria
console.*calls remain insrc/production code