Currently, we expose the logger instance only through the context, e.g.:
@crawler.router.default_handler
async def request_handler(context: BeautifulSoupCrawlingContext) -> None:
context.log.info(f'Processing {context.request.url}...')
We could expose it on the Crawler level as well. To be able to log stuff without logger initialization outside of the request handler.
crawler = BeautifulSoupCrawler()
crawler.log.info('Starting...')
Currently, we expose the logger instance only through the context, e.g.:
We could expose it on the Crawler level as well. To be able to log stuff without logger initialization outside of the request handler.