1.0.1 • Published 4 years ago

@unlogger/bugsnag v1.0.1

Weekly downloads
27
License
ISC
Repository
-
Last release
4 years ago

unlogger-bugsnag

A console provider for Unlogger that uses Bugsnag.

Basic usage

$ npm i -s @unlogger/core @unlogger/bugsnag
const logger = require('@unlogger/core');
const bugsnagProvider = require('@unlogger/bugsnag');

await logger.addProviderAsync(bugsnagProvider, 'BUGSNAG_API_KEY');

logger.log('log test'); // will log with 'info' severity
logger.info('info test');
logger.warn('warn test');
logger.error('error test');

Customizing Bugsnag notify options

You can override and customize the notify options passing a context with a property named bugsnagOpts to log methods.

Example:

logger.error('error', {
  bugsnagOpts: { metaData, user, device }
});

See more about the Bugsnag's notify options here and about Unlogger's contexts here.