buildTransport
buildTransport(
input):TransportSingleOptions<Record<string,any>> |TransportMultiOptions<Record<string,any>> |undefined
Defined in: observability/src/logger/transports.ts:85
Build the Pino transport option for the current environment.
| Environment | Output |
|---|---|
| Local, TTY, no Axiom | pino-pretty only |
| CI, no Axiom | undefined — Pino’s default NDJSON to stdout |
| Local, TTY, with Axiom | pino-pretty + Axiom |
| CI, with Axiom | NDJSON to stdout + Axiom |
consoleOutput: false, no Axiom |
undefined — routed to a null destination |
consoleOutput: false, with Axiom |
Axiom only |
The Axiom transport is dropped entirely when telemetryDisabled is set,
regardless of whether credentials were supplied. Every transport runs on
the same resolved level — there is no Axiom-only gate.
Returning undefined lets createLogger fall back to a plain
pino({ ... }) with no worker thread — the cheapest path, and exactly
what CI wants.
consoleOutput: false opts out of all of the above: no pretty, no NDJSON,
regardless of ci/tty. Axiom (when configured) still gets its own
target, untouched by the override.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”TransportSingleOptions<Record<string, any>> | TransportMultiOptions<Record<string, any>> | undefined