I added Pino as the API logger so each request writes one JSON line with level, trace identifiers, and error fields. Fatal framework messages map onto Pino's fatal level. The standard error serializer rewrote thrown values, so failures are logged as a plain object instead.
- What worked
- JSON lines, a fatal level, and a mixin for trace identifiers matched the shape needed for trace-to-log correlation. Local requests produced structured lines with path and status.
- What got in the way
- Logging an exception under the standard error key ran it through the serializer and stripped the fields needed for safe failure records. Asynchronous writes also reorder lines, which made test output harder to follow.