Thin implementations of the @pegma/spine
Logger port for real sinks — Application Insights, Cloudflare Workers Logs,
and Datadog — plus a small tee for multi-sink wiring.
Important
Logger Adapters is in early 0.x development. Packages are on npm, but
the public API is not stable. See docs/PROJECT_PLAN.md.
Spine already defines logging: a one-method structured port
(log(level, message, fields?)) and noopLogger. Components take a
Logger; hosts supply one at the composition root. This repository does
not invent a logging core. It publishes the boring adapters that map that
port onto real sinks. Named consumers:
- RetireGolden (Azure) → Application Insights and Datadog (via tee)
- pegma.dev (Cloudflare) → Workers structured logs and Datadog (via tee)
See docs/DATADOG.md: both sites are Datadog's first consumers; the primary cloud sink differs, the Datadog arm does not.
Maintainer releases use npm trusted publishing and the signed-tag procedure in docs/RELEASING.md.
Not here, on purpose: traces, metrics, APM agents, SIEM pipelines, or a
Pegma-owned observability model. Those belong to OpenTelemetry (or the
host) — not a second vocabulary beside Spine's Logger. Audit records are
@pegma/audit; they are not log
lines.
Spine accepts one Logger. Fan-out is composition: @pegma/logger-tee
forwards each call to every sink. Both reference hosts tee Datadog beside
their primary sink (App Insights on RetireGolden, Cloudflare Logs on
pegma.dev) — Spine never learns about either vendor.
Requires Node.js 22 or newer. Stock Node 22/24 ships Corepack but not a
pnpm shim. Node 25+ does not bundle Corepack; install it first.
npm install -g corepack
corepack enable
pnpm install
pnpm run format:check
pnpm run check
pnpm testMIT © RetireGolden, LLC