Skip to content

catcuts/log4js-node-sentry-appender

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentry log4js appender

This package requires @sentry/node

An example of the config: multiple sentry server supported

const log4js = require('log4js');

log4js.configure({
  appenders: {
    console: { type: 'console' },
    server1: {  
      type: 'log4js-node-sentry-appender', 
      dns: 'https://{KEYS}@{HOST}/{PROJECT_ID}', 
      env: 'production' 
    },
    server2: {  
      type: 'log4js-node-sentry-appender', 
      dns: 'https://{KEYS}@{HOST}/{PROJECT_ID}', 
      env: 'production' 
    }
  },
  categories: {
    default: { 
      appenders: ['console', 'server1'], 
      level: 'error' 
    },
    debug: { 
      appenders: ['console', 'server2'], 
      level: 'debug' 
    }
  }
});

var logger_default = log4js.getLogger();
var logger_debug = log4js.getLogger('debug');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%