wet-aquaW
Apify & Crawlee3y ago
4 replies
wet-aqua

config logs: 1/ add timestamp 2/save to file

Hello
Now logs from Crawlee looks like:

INFO PuppeteerCrawler: Starting the crawl DEBUG PuppeteerCrawler:AutoscaledPool:Snapshotter: Setting max memory of this run to ... DEBUG PuppeteerCrawler:SessionPool: Created new Session - session_fLcLuWwBqm DEBUG PuppeteerCrawler:SessionPool: Created new Session - session_ufpfTcwERo

Questions:
1. How to add timestamp to logs?
Like:
2023-01-25 12:34:58.123 INFO PuppeteerCrawler: Starting the crawl 2023-01-25 12:34:58.456 DEBUG PuppeteerCrawler:AutoscaledPool:Snapshotter: Setting max memory of this run to ...

2. How to save logs in file [and possibly also watch on console]?

BTW. should I put question here or better on stack-over-flow and push link here?

Thanks and cheers
GT
Was this page helpful?