Skip to main content
Pino is the recommended logger provider: extremely fast structured JSON output in production, with optional pino-pretty colorised formatting for local dev.

The LoggerType interface

Every logger provider satisfies the same contract, so all log calls work identically regardless of which provider is active:
getFeatureLogger creates a child logger scoped to a named feature. Pino implements this as a true child logger with { feature } bound and a duration field (ms since the child was created) appended to every line:
Use getFeatureLogger for any operation that spans multiple log lines — it makes log correlation trivial in aggregators.

Why

Pino is one of the fastest Node.js loggers available — it serialises log lines to JSON with minimal overhead and integrates cleanly with log aggregators like Datadog, Logtail, or CloudWatch. The pretty: true flag activates pino-pretty for colorised, human-readable output during local development, while production stays machine-parseable JSON.

Setup

  1. In apps/backend/package.json, ensure "tooling-logger-pino": "workspace:*" is listed under dependencies.
  2. Run make deps-install.
  3. In development.ts, set tools.logger:
  4. In production.ts, set tools.logger:
  5. Run make test module=tooling-logger-pino and make test module=backend.

Log levels

Gotchas

  • pretty: true requires pino-pretty to be installed. It is a dependency of tooling-logger-pino, so it’s available automatically.
  • Pino serialises log arguments asynchronously in a worker thread. Very high-frequency logging (> 100k lines/sec) can cause slight buffering — this is normal.
  • Never set pretty: true in test.ts — it adds noise to test output. Leave it false or omit it entirely.

What’s next?

  • Console — the minimal fallback provider.
  • Configuration — switching pluggable tool implementations.
  • Tooling system — how loaders and workspace packages fit together.