Skip to content

zappen999/notera-transport-rollbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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?: [level: string]: string;
}

Installation

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

About

Rollbar transport for the Notera package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published