nartc / mapper

🔥 An Object-Object AutoMapper for TypeScript 🔥
https://automapperts.netlify.app/
MIT License
961 stars 84 forks source link

`console.[fn].bind` instead of `console.[fn].call` in logger #616

Open ajfranzoia opened 2 months ago

ajfranzoia commented 2 months ago

I was trying to find out the root cause of metadata not being attached to fields and I wasn't receiving any logging from the lib. I found out that the AutoMapperLogger.warn method was being effectively called but nothing was output to stdout.

I think the root cause is using bind instead of call inside of the logger methods, is this done on purpose?

https://github.com/nartc/mapper/blob/58904d2d4b5d9109be8dc5e5ad9c808b39d3a760/packages/core/src/lib/utils/logger.ts#L20