Miss any of our Open RFC calls?Watch the recordings here! »

notera-transport-rollbar

0.1.0 • Public • Published

Notera Rollbar Transport

This package provides a Rollbar transport for the Notera package.

Build Status Coverage Status

Usage

Example usage with Notera:

const Notera = require('notera')
const noteraTransportRollbar = require('notera-transport-rollbar')
const Rollbar = require('rollbar');
 
const rollbar = new Rollbar({ accessToken: 'YOUR_TOKEN_HERE' });
const logger = new Notera();
 
logger.on('error', err => {
  console.log('Some unexpected happened during logging', err)
})
 
logger.addTransport(noteraTransportRollbar({
    rollbar
  // More options
}))
 
// Use logger as usual
logger.ctx('SERVER').info('Something is up', { some: 'meta' })

Options

interface Options {
  // Instance of Rollbar
  rollbar: Rollbar;
 
  // Override mappings of Notera logging levels against Rollbar levels.
  // Defaults to:
  // emerg:   'critical',
  // alert:   'critical',
  // crit:    'critical',
  // err:     'error',
  // warning: 'warning',
  // notice:  'warning',
  // info:    'info',
  // debug:   'debug'
  levelMap?: [levelstring]string;
}

Installation

  • npm install notera-transport-rollbar
  • yarn add notera-transport-rollbar

Install

npm i notera-transport-rollbar

DownloadsWeekly Downloads

1

Version

0.1.0

License

GPL-3.0

Unpacked Size

40.3 kB

Total Files

7

Last publish

Collaborators

  • avatar