log4js-node-sentry

1.0.0 • Public • Published

Sentry Appender for log4js

This is a simple appender for log4js to send log messages to Sentry.

Installation

$ npm install log4js-node-sentry

Basic Usage

var log4js = require('log4js');
 
// Configure log4js
log4js.configure({
    appenders: [
        {
            type:       'log4js-node-sentry',
            dsn:        '{{ YOUR SENTRY DSN }}',
            category:   'sentry'
        }
    ],
    levels: {
        sentry: 'ERROR'
    }
});
 
// Get the logger
var logger = log4js.getLogger('sentry');
 
// Send an error to Sentry
logger.error('This is a test.');

Readme

Keywords

none

Package Sidebar

Install

npm i log4js-node-sentry

Weekly Downloads

7

Version

1.0.0

License

MIT

Last publish

Collaborators

  • theartoflogic