Skip to content

Commit 7cbf3a8

Browse files
author
Hamid Tavakoli
authored
Merge pull request #55 from topcoder-platform/sendGridLogging
Add log to sendgrid email
2 parents 6bafd39 + 043abd8 commit 7cbf3a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

connect/service.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
const sgMail = require('@sendgrid/mail');
77
const config = require('config');
8+
const { logger } = require('../src/common/logger');
89

910
// set api key for SendGrid email client
1011
sgMail.setApiKey(config.SENDGRID_API_KEY);
@@ -50,6 +51,7 @@ const sendEmail = (templateId, message) => { // send email
5051
bcc,
5152
};
5253
}
54+
logger.info(`Sending email with templateId: ${templateId} and message: ${JSON.stringify(msg)}`);
5355
return sgMail.send(msg)
5456
}
5557
module.exports = {

0 commit comments

Comments
 (0)