winston-email

An email transport for winston

npm install winston-email
1 downloads in the last day
23 downloads in the last week
119 downloads in the last month

winston-email

email transport logging for winston using nodemailer

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
npm loves you