Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
Build docs
Ondra Urban81699676adb8
diff --git a/docs/api/log.md b/docs/api/log.mdindex 29e2257c1..50bd38338 100644--- a/docs/api/log.md+++ b/docs/api/log.md@@ -24,16 +24,25 @@ set the appropriate level. The default log level is `INFO`, which means that**Example:**```-log.info('INFO') // prints INFO-log.debug('DEBUG') // doesn't print anything+const Apify = require('apify');+const { log } = Apify.utils;-log.setLevel(log.LEVELS.DEBUG)-log.debug('DEBUG') // prints DEBUG+log.info('Information message', { someData: 123 }); // prints message+log.debug('Debug message', { debugData: 'hello' }); // doesn't print anything-log.setLevel(log.LEVELS.ERROR)-log.debug('DEBUG') // doesn't print anything-log.info('INFO') // doesn't print anything-log.error('ERROR') // prints ERROR+log.setLevel(log.LEVELS.DEBUG);+log.debug('Debug message'); // prints message++log.setLevel(log.LEVELS.ERROR);+log.debug('Debug message'); // doesn't print anything+log.info('Info message'); // doesn't print anything++log.error('Error message', { errorDetails: 'This is bad!' }); // prints message+try {+ throw new Error('Not good!');+} catch (e) {+ log.exception(e, 'Exception occurred', { errorDetails: 'This is really bad!' }); // prints message+}```Another very useful way of setting the log level is by setting the `APIFY_LOG_LEVEL`