Priority: high
Description
The backend currently uses console.log with unstructured output. Structured JSON logging with a unique request ID per request is needed for production observability and log aggregation.
Acceptance Criteria
- Every log line is valid JSON with
timestamp, level, requestId, message
- Request ID is generated per request and attached to all logs within that request
- Request ID is returned in the
X-Request-ID response header
- Log level is configurable via environment variable
- Errors include stack traces in the
error field
Priority: high
Description
The backend currently uses
console.logwith unstructured output. Structured JSON logging with a unique request ID per request is needed for production observability and log aggregation.Acceptance Criteria
timestamp,level,requestId,messageX-Request-IDresponse headererrorfield