Are there any plans to extend Crawlee logger?
Ref:
https://crawlee.dev/api/core/class/LoggerI found this to set the
skipTime
option
const Apify = require('apify');
const { utils: { log } } = Apify;
log.setOptions({
logger: new log.LoggerText({ skipTime: false }),
});
but it doesn't seem to work. I got
Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'log')
My code:
import Apify from 'apify'
const { utils: { log } } = Apify;
log.setOptions({
logger: new log.LoggerText({ skipTime: false }),
});
// https://crawlee.dev/api/playwright-crawler/class/PlaywrightCrawler
const crawler = new PlaywrightCrawler(
launchContext: {
launchOptions: {
headless: true,
stealth: true,
viewport: { width:600, height:300 }
},
},
async requestHandler({ request, page, enqueueLinks, log }) {
const title = await page.title();
log.info(`Titre: ${title} Url: ${request.loadedUrl}`);
}