Here is my code
export class Test {
constructor(
private readonly logger: PinoLogger,
) {}
@Put('test')
@UseInterceptors(
FileInterceptor('file', {
storage: multer.diskStorage({
destination: '/uploads',
filename: (req: any, file: any, cb: any) => {
cb(null, req.body.filename);
},
}),
fileFilter: function (req, file, cb) {
this.logger.info(`Test log`);
}
},
}),
)
}
On this I’m not able access logger
getting TypeError: Cannot read properties of undefined (reading 'logger')