Skip to content

kitakitabauer/log4js-node-airbrake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log4js-node-airbrake

npm version

log4js Airbrake Reporter

Installing

Install with npm using the following command

npm install log4js-node-airbrake

Configuring

Like all log4js appenders, log4js-node-airbrake can be configured via a file or code.

var log4js = require('log4js');

log4js.configure({
  appenders: [
    {
      category: 'basic',
      type: 'log4js-node-airbrake',
      level: 'not-notification-level',
      key: 'your-project-token',
    }
  ]
});

var logger = log4js.getDefaultLogger();
logger.debug('Don't won't be logged');
logger.info('Nor will this');
logger.error('Error String');
logger.error(new Error('Error Obj with a backtrace'));

This will report all events from the appender as Errors (regardless of the logleve!) to your Airbrake application

About

log4js Airbrake Reporter

Resources

Stars

Watchers

Forks

Packages

No packages published