Nestjs Pino Extra Packages - v1.0.0
    Preparing search index...
    interface Params {
        assignResponse?: boolean;
        exclude?: (string | RouteInfo)[];
        forRoutes?: (string | RouteInfo | Type<any>)[];
        pinoHttp?:
            | Options<IncomingMessage, ServerResponse<IncomingMessage>, never>
            | DestinationStream
            | [
                Options<IncomingMessage, ServerResponse<IncomingMessage>, never>,
                DestinationStream,
            ];
        renameContext?: string;
        useExisting?: true;
    }
    Index

    Properties

    assignResponse?: boolean

    Optional parameter to also assign the response logger during calls to PinoLogger.assign. By default, assign does not impact response logs (e.g.Request completed).

    exclude?: (string | RouteInfo)[]

    Optional parameter for routing. It should implement interface of parameters of NestJS built-in MiddlewareConfigProxy['forRoutes'].

    https://docs.nestjs.com/middleware#applying-middleware It can be used for both disabling automatic req/res logs and removing request context from following logs. It works for all requests by default. If you only need to turn off the automatic request/response logging for some specific (or all) routes but keep request context for app logs use pinoHttp.autoLogging field.

    forRoutes?: (string | RouteInfo | Type<any>)[]

    Optional parameter for routing. It should implement interface of parameters of NestJS built-in MiddlewareConfigProxy['forRoutes'].

    https://docs.nestjs.com/middleware#applying-middleware It can be used for both disabling automatic req/res logs and removing request context from following logs. It works for all requests by default. If you only need to turn off the automatic request/response logging for some specific (or all) routes but keep request context for app logs use pinoHttp.autoLogging field.

    pinoHttp?:
        | Options<IncomingMessage, ServerResponse<IncomingMessage>, never>
        | DestinationStream
        | [
            Options<IncomingMessage, ServerResponse<IncomingMessage>, never>,
            DestinationStream,
        ]

    Optional parameters for pino-http module

    renameContext?: string

    Optional parameter to change property name context in resulted logs, so logs will be like: {"level":30, ... "RENAME_CONTEXT_VALUE_HERE":"AppController" }

    useExisting?: true

    Optional parameter to skip pino configuration in case you are using FastifyAdapter, and already configure logger in adapter's config. The Pros and cons of this approach are described in the FAQ section of the documentation: