Noteworthy Programming Masterpiece

    @log4js-node/mailgun
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    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'
      }
    });

    Install

    npm i @log4js-node/mailgun

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    Apache-2.0

    Unpacked Size

    16 kB

    Total Files

    5

    Last publish

    Collaborators

    • csausdev