New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crawlee-pino

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crawlee-pino

🌲 use Pino to log within Crawlee

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

crawlee-pino

🌲 use Pino to log within Crawlee

Installation

yarn add crawlee-pino

Get Started

  1. Create a Pino logger
import pino from 'pino'

const pinoLogger = pino()
  1. Create a CrawleePino logger
import { CrawleePino } from 'crawlee-pino'

const crawleePinoLogger = new CrawleePino({ pino: pinoLogger })
  1. Assign the logger to Crawlee
import { PuppeteerCrawler, Log } from 'crawlee'

const crawler = new PuppeteerCrawler({
  log: new Log({ logger: crawleePinoLogger }),
})
  1. Run your crawler
await crawler.run(['https://crawlee.dev'])

Full Usage

import pino from 'pino'
import { PuppeteerCrawler, Log } from 'crawlee'
import { CrawleePino } from 'crawlee-pino'

export const logger = pino()

export const crawler = new PuppeteerCrawler({
  log: new Log({
    logger: new CrawleePino({ pino: logger.child({ tag: 'crawlee' }) }),
  }),
})

await crawler.run(['https://crawlee.dev'])

References

License

Apache-2.0 © yelo, 2023 - present

FAQs

Package last updated on 20 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc