Response, NextFunction } from 'express'; import { HttpService } from '@nestjs/axios'; import pino from 'pino'; @Injectable() export class PinoLoggerMiddleware implements NestMiddleware { constructor(private readonly httpService: HttpService) { } use(req: Request, res: Response...
{customProp:req.customProp,// user request-scoped data is in res.locals for express applicationscustomProp2:res.locals.myCustomData}}})functionhandle(req,res){logger(req,res)req.log.info('something else')res.log.info('just in case you need access to logging when only the response is in...