pinoLogger
pinoLogger(
pino):Required<PipelineLogger>
Defined in: packages/pipeline/src/logger.ts:58
Adapts a pino logger to PipelineLogger, so behaviors write structured records:
log writes at pino’s info and verbose at trace; the last string argument of a
call with more than one is the context field, as NestJS passes it; on error, a string
before it is the stack field; an Error message becomes err; an object message, such
as LoggingBehavior’s logFormat: 'structured' records, becomes the record’s fields;
other arguments go to params.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Example
Section titled “Example”import pino from 'pino';
const logger = pinoLogger(pino());const pipeline = createPipeline({ logger, globalBehaviors: { before: [logging({ logFormat: 'structured' })] },});