Structured logger for production hosts. Each call writes one JSONL object,
shaped {ts, level, service, event, ...fields}, for log collectors to parse
line by line. By default every level writes to stderr (info, debug, and warn
via console.warn; error via console.error); supply out and err to
route the two separately. Implements the same Logger interface as the
no-op default, so a host can swap it in directly.
Supply now (epoch ms) so a test can freeze the timestamp and check the exact
line; it defaults to wall-clock time. service names the emitting process and
appears on every line.
Structured logger for production hosts. Each call writes one JSONL object, shaped
{ts, level, service, event, ...fields}, for log collectors to parse line by line. By default every level writes to stderr (info, debug, and warn viaconsole.warn; error viaconsole.error); supplyoutanderrto route the two separately. Implements the sameLoggerinterface as the no-op default, so a host can swap it in directly.Supply
now(epoch ms) so a test can freeze the timestamp and check the exact line; it defaults to wall-clock time.servicenames the emitting process and appears on every line.