-
I am trying to use WInston logger because I want to control the transports for the same. I am then using the winston logger instance to log everything inside my app because I am unable to figure out how to configure the crawlee instance to use my custom class. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can provide your own logger in the Note that there might be more places using the logger, this will help only with the logs produced by the crawler class. We generally don't support other loggers out of box, but its something we were thinking about too. |
Beta Was this translation helpful? Give feedback.
You can provide your own logger in the
log
option of the crawler, but it needs to conform to the apify logger interface, so you'd have to create your own proxy for it to be able to use winston.https://github.com/apify/crawlee/blob/master/packages/basic-crawler/src/internals/basic-crawler.ts#L329
Note that there might be more places using the logger, this will help only with the logs produced by the crawler class. We generally don't support other loggers out of box, but its something we were thinking about too.