bunyan-sentry-stream
Write log to Sentry/Raven by using Bunyan
Last updated 9 years ago by cptechadmin .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bunyan-sentry-stream 
SYNC missed versions from official npm registry.

Bunyan Sentry Stream

Coverage Status Circle CI

Write log to Sentry/Raven by using Bunyan

Install & Use

npm i --save

How to :


const raven = require('raven');
const bunyan = require('bunyan');
const sentryStream = require('bunyan-sentry-stream');

const client = new raven.Client(process.env.SENTRY_DSN, { /* EXTRAS */ });

const simpleLogger = bunyan.createLogger({
  name: 'logger',
  streams: [
    {
      level: 'debug',
      stream: process.stdout
    },
    sentryStream(client)
  ]
});

// OR //

const SentryStream = require('bunyan-sentry-stream').SentryStream;

const advancedLogger = bunyan.createLogger({
  name: 'logger',
  streams: [
    {
      level: 'debug',
      type: 'raw', // Mandatory type for SentryStream
      stream: new SentryStream(client)
    }
  ]
});

Contribute

npm test          # start test suites (coverage + lint + mocha)
npm run coverage  # run the code coverage tool
npm run lint      # execute linter tool
npm run mocha     # run the tests

Current Tags

  • 1.2.1                                ...           latest (9 years ago)

6 Versions

  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (7)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |