Decision record · logging

swm-logs or Pino for Node.js?

Short answer

Choose swm-logs when zero runtime dependencies, a small ESM API, and application-owned delivery are hard requirements. Choose Pino when a mature transport ecosystem, worker-based processing, and compatibility with existing Pino integrations matter more.

0.1.1
swm-logs
0
runtime deps
22 / 24
Node.js

Scope

This comparison fixes @swarmmachina/swm-logs at 0.1.1 and the Pino transport model at 10.1.0. swm-logs is still experimental and is not a drop-in Pino replacement.

Engineering comparison of swm-logs and Pino

Criterionswm-logs 0.1.1Pino 10.1.0
StageAn experimental package with an intentionally small surface.A mature project with an established integration ecosystem.
Runtime surfaceNative ESM for Node.js 22/24 with no third-party runtime dependencies.Its own package and integration surface; verify it for the selected release.
FormatOne NDJSON record per event; numeric levels are Pino-compatible.Structured JSON using the familiar Pino level model.
DeliverySynchronous callback transport; queues, retries, and persistence belong to the application.The official transport API supports worker threads, targets, and pipelines.
BackpressureImmediate mode uses the Node.js stream queue; strict bounds require a custom bounded transport.Behavior depends on the selected destination or transport and its configuration.
Migrationbase → bindings, custom levels → log(); workers, pretty output, and vendor transports are not bundled.Prefer it when the application already depends on Pino APIs or transports.

Decide from constraints

  1. 01

    A minimal production surface is required

    Consider swm-logs

    When Node.js 22/24 and application-owned delivery are already accepted constraints.

  2. 02

    Ready-made external transports are required

    Stay with Pino

    Its worker transport API and accumulated ecosystem outweigh a smaller surface.

  3. 03

    A drop-in migration is required

    Do not swap packages blindly

    Levels are compatible, but the full API, transport lifecycle, and extension set are not.

What this comparison does not claim

  • This is a contract comparison, not a universal performance ranking.
  • swm-logs does not bundle file rotation, pretty printing, network exporters, or vendor SDKs.
  • Before migrating, test serializers, redaction paths, the crash path, and delivery guarantees.

Primary sources

Versions and claims can be checked directly against fixed source snapshots.