JSPM

x-winston-mailer

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q14616F
  • License BSD

Winston transport based on mailer. It buffers errors, and packs them in one email if necessary.

Package Exports

  • x-winston-mailer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (x-winston-mailer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

An email transport based on mailer for winston.

Installation

  $ npm install winston
  $ npm install winston-mailer

Usage

  var winston = require('winston');
  
  //
  // Requiring `winston-mailer` will expose 
  // `winston.transports.Mail`
  //
  require('winston-mailer').Mail;
  
  winston.add(winston.transports.Mail, options);

The Mail transport uses mailer behind the scenes. Options are the following:

  • to: The address(es) you want to send to. [required]
  • from: The 'from' address (default: winston@[server-host-name].com)
  • host: SMTP server hostname (default: localhost)
  • port: SMTP port (default: 587 or 25)
  • username User for server auth
  • password Password for server auth
  • level: Level of messages that this transport should log.
  • silent: Boolean flag indicating whether to suppress output.
  • prefix: String for using in as prefix in the subject.
  • maxBufferItems Max errors that will be buffered (default 100)
  • maxBufferTimeSpan Max miliseconds errors will be buffered (default 60000)