Skip to content

log4js-node/mailgun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailgun Appender for Log4JS

This is an optional appender for log4js-node.

npm install @log4js-node/mailgun

This appender uses the mailgun service to send log messages as emails. It uses the mailgun-js package.

Configuration

  • type - @log4js-node/mailgun
  • apiKey - string - your mailgun API key
  • domain - string - your domain
  • from - string
  • to - string
  • subject - string
  • layout - object (optional, defaults to basicLayout) - see layouts

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: '@log4js-node/mailgun',
    apiKey: '123456abc',
    domain: 'some.company',
    from: 'logging@some.service',
    to: 'important.bosses@some.company',
    subject: 'Error: Developers Need To Be Fired'
  }
});

About

Mailgun Appender for Log4JS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy