log4js-node

A port of log4js to node.js

View the Project on GitHub

Mailgun Appender

This appender uses the mailgun service to send log messages as emails. It requires the mailgun-js package to be added to your dependencies.

Configuration

The body of the email will be the result of applying the layout to the log event. Refer to the mailgun docs for how to obtain your API key.

Example

log4js.configure({
  appenders: {
    type: 'mailgun',
    apiKey: '123456abc',
    domain: 'some.company',
    from: 'logging@some.service',
    to: 'important.bosses@some.company',
    subject: 'Error: Developers Need To Be Fired'
  }
});