improve logging

This commit is contained in:
les
2021-04-28 12:44:26 +02:00
parent f7ba790398
commit 5f8bbd68c8
16 changed files with 63 additions and 39 deletions

View File

@@ -19,7 +19,7 @@ const mail = {
},
_send (addresses, template, locals, locale) {
log.debug(`Send ${template} email to ${addresses} with locale ${locale}`)
log.info(`Send ${template} email to ${addresses} with locale ${locale}`)
const email = new Email({
views: { root: path.join(__dirname, '..', 'emails') },
htmlToText: true,
@@ -61,8 +61,7 @@ const mail = {
}
return email.send(msg)
.catch(e => {
log.error('Error sending email =>')
log.error(e)
log.error('Error sending email => %s', e)
})
}
}