Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

winston-email

pgherveou3190.1.0

An email transport for winston

logging, winston, email

readme

winston-email

email transport logging for winston using [nodemailer] 1

install

$ npm install winston-email

usage

add an email option to your logger


var winston = require('winston');
require('winston-email');

winston.loggers.add('logger', {
  email: {
    from   : 'xxx',
    to     : 'xxx',
    service: 'Gmail',
    auth   : { user: 'xxx', pass: 'xxx'},
    tags   : ['your app'] //optional tags for the subject
  }
  // other transports
});

logger = winston.loggers.get('logger');
logger.info("info msg", {title:'optional title'});

test

FROM=<youremail> TO=<youremail> USER=<youremail> PASS=<your pwd> node test