Socket
Socket
Sign inDemoInstall

pino-bugsnag-transport

Package Overview
Dependencies
36
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pino-bugsnag-transport

Integrates Pino and Bugsnag.


Version published
Weekly downloads
1
Maintainers
1
Install size
808 kB
Created
Weekly downloads
 

Readme

Source

Pino Bugsnag transport

license npm version GitHub Workflow Status

A transport for sending pino error logs to Bugsnag.

Install

npm i @bugsnag/node pino-bugsnag-transport

Usage

import pino from 'pino'
import Bugsnag from '@bugsnag/node'

const logger = pino({
  transport: {
    target: 'pino-bugsnag-transport',
    options: {
      bugsnag: Bugsnag, // required
      errorKey: 'err',
      messageKey: 'msg',
      minLevel: 'warn',
      warningLevel: 'warn',
      errorLevel: 'error',
      withLogRecord: true,
      onError: (event, cb) => {},
    },
  },
})

Options

  • bugsnag - Pass the initialized static Bugsnag instance
  • errorKey - Match the pino option when not using the standard error key
  • messageKey - Match the pino option when not using the standard message key
  • minLevel - The minimum log level to meet before sending to Bugsnag, default: 'warn' / 40
  • warningLevel - The minimum log level for errors to be marked as warnings (and not info), default: 'warn' / 40
  • errorLevel - The minimum log level for errors to be marked as warnings (and not error), default: 'error' / 50
  • withLogRecord - Send the entire log record to bugsnag as metadata, default: true
  • onError - Provide a callback passed as the second argument to Bugsnag.notify for full customization

FAQs

Last updated on 23 Feb 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc