Skip to main content
Console is the minimal logger provider: it forwards every log call to the native console.info, console.warn, and console.error methods, and silences all output in the test environment.

Why

The console provider is useful when you want the absolute minimum setup and don’t need structured JSON logs. It adds no dependencies and produces human-readable output. Switch to Pino as soon as you need log aggregation, structured fields, or performance.

Setup

  1. In apps/backend/package.json, ensure "tooling-logger-console": "workspace:*" is listed under dependencies.
  2. Run make pnpm-lockfile-update then make pnpm-install.
  3. In the desired config file, set tools.logger:
    logger: {
      client: LoggerClientType.CONSOLE,
    }
    
  4. Run make test module=tooling-logger-console.

Test behaviour

All output is silenced when NODE_ENV === 'test'. This is intentional — it keeps Jest output clean without requiring any extra test setup.

Gotchas

  • The console provider has no structured fields, no JSON serialisation, and no log-level filtering. Use it only where simplicity is more important than observability.
  • getFeatureLogger is supported but does not attach duration — it only appends { feature } to the meta object.

What’s next?

  • Pino — the recommended structured logger for dev and production, including the full LoggerType interface.