@btravstack/observability / pino
pino
Functions
pinoSink()
ts
function pinoSink(logger): Sink;Defined in: observability/src/pino.ts:27
A Sink over a pino logger — the subpath a deployment reaches for when the default JSON sink's JSON.stringify per line is the thing showing up in a profile. pino is an optional peer: install it, import @btravstack/observability/pino, and pass the sink; a consumer that never imports this file never needs it.
ts
import pino from "pino";
import { observability } from "@btravstack/observability";
import { pinoSink } from "@btravstack/observability/pino";
observability({ sink: pinoSink(pino()) });The level filter stays ours: createLogger has already decided the line is worth writing by the time a sink sees it, so pino is configured at trace here — one filter in the process, and it is the one LOG_LEVEL validated at startup. fatal and trace map to pino's own; the ambient unit's ids ride as fields, not as a message prefix, so they stay indexable.
Parameters
| Parameter | Type |
|---|---|
logger | Logger |