to send email unhandle exception
rahultank1993 opened this issue · comments
i am trying to send email when unhandled exception but it could not work
my code is
var logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)({
colorize : true,
timestamp:function(){
return moment().format("DD.MM.YYYY hh:mm:ss");
}
})
],
exceptionHandlers: [
new winston.transports.Mail({
to:'email id',
from:'email id',
host:'smtp.gmail.com',
username:'email id',
password:'password',
ssl: true,
handleExceptions : true,
})
]
});
I skipped the
handleException: true
Including above probably does not make sense because you are inside exceptionHandler anyway. I initially added a question in SO but, then I figured it out so answered my own question:
+1