- pnpm 10 workspace + TypeScript strict + ESLint flat + Prettier - CLAUDE.md as canonical brief - docs/tasks/ — 22 task briefs broken out by phase for sub-sessions - docs/decisions/ — ADR scaffold Implements task 01 (repo-init).
28 lines
641 B
Markdown
28 lines
641 B
Markdown
# 62 — Structured logging
|
|
|
|
## Goal
|
|
|
|
JSON logs for the app, easy to grep and ship later.
|
|
|
|
## Depends on
|
|
|
|
- 02
|
|
|
|
## Scope
|
|
|
|
- `pino` for app logs; pretty-print only in dev.
|
|
- Log levels via `LOG_LEVEL` env (default `info`).
|
|
- Request log middleware (method, path, status, duration, userId if present).
|
|
- Errors: capture stack + cause, never log secrets.
|
|
|
|
## Out of scope
|
|
|
|
- Log shipping (Loki/etc).
|
|
- Sentry/error tracking.
|
|
|
|
## Acceptance criteria
|
|
|
|
- [ ] Production logs are single-line JSON.
|
|
- [ ] No secret values appear anywhere in the log stream during a typical session.
|
|
- [ ] Request logs include duration and userId when authenticated.
|