Μετάβαση στο περιεχόμενο

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.

PinoLike

Required<PipelineLogger>

import pino from 'pino';
const logger = pinoLogger(pino());
const pipeline = createPipeline({
logger,
globalBehaviors: { before: [logging({ logFormat: 'structured' })] },
});