You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(logging): use logger instead of console in stack modules (#3442)
* fix(auth): clean up stale test users before signup in integration tests
Auth integration tests used hardcoded emails without cleaning the
database before each run. On shared MongoDB instances (e.g. ARC
self-hosted runners), stale data from previous CI runs caused
cascading test failures.
Add pre-signup cleanup in all beforeAll/beforeEach hooks across
the four auth integration test files to purge any leftover users
by email before attempting signup.
Closes#3437
* fix(auth): add @returns JSDoc to purgeUser helper
* fix(logging): replace console.* with Winston logger in stack modules
Replace console.error/log/warn/info with the Winston-based logger from
lib/services/logger.js across all production stack modules. This ensures
structured logging, Sentry capture, and consistent log formatting.
Files excluded from this change:
- config/index.js and lib/helpers/config.js (loaded before logger init)
- lib/services/logger.js (is the logger itself)
- scripts/seed.js (CLI script)
- Test files (except where assertions needed updating)
Closes#3434
* fix(logging): address review feedback — preserve error stacks, redact secrets
- Log full Error objects instead of just .message (server.js, mailer, sentry)
- Remove JSON.stringify wrapping on error messages (server.js)
- Fix 'develoment' typo → 'development' (lib/app.js)
- Redact DB URI credentials before logging (lib/app.js)
- Redact seed passwords from log output (lib/services/seed.js)
* fix(logging): address CodeRabbit review — full error objects, reorder close log
- Include error object in readiness-check warn (lib/app.js)
- Move success log after error check in server close callback (lib/app.js)
- Log full error object for migration failures (lib/services/migrations.js)
0 commit comments