Skip to content

Commit

Permalink
fix: Add better debug logging around which email addresses are used w…
Browse files Browse the repository at this point in the history
…hen sending alert emails

Fixes #487
  • Loading branch information
mountaindude committed Jun 12, 2022
1 parent 4c06c86 commit 8e6fb32
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib/smtp.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ async function sendReloadTaskFailureNotificationEmail(reloadParams) {
);

if (taskSpecificAlertEmailAddresses.length > 0) {
globals.logger.debug(
`TASK FAILED ALERT EMAIL: Added task specific send list: ${JSON.stringify(taskSpecificAlertEmailAddresses, null, 2)}`
);

mainSendList = mainSendList.concat(taskSpecificAlertEmailAddresses);
}

Expand All @@ -345,6 +349,9 @@ async function sendReloadTaskFailureNotificationEmail(reloadParams) {
globals.logger.verbose(`TASK FAILED ALERT EMAIL: Send alert emails for all tasks`);

if (globalSendList.length > 0) {
globals.logger.debug(
`TASK FAILED ALERT EMAIL: Added global send list for failed task: ${JSON.stringify(globalSendList, null, 2)}`
);
mainSendList = mainSendList.concat(globalSendList);
}
} else {
Expand All @@ -359,6 +366,9 @@ async function sendReloadTaskFailureNotificationEmail(reloadParams) {
);

if (sendAlert === true) {
globals.logger.debug(
`TASK FAILED ALERT EMAIL: Added send list based on email-alert-CP: ${JSON.stringify(globalSendList, null, 2)}`
);
// 2.2.1 Yes: Add system-wide list of recipients to send list
if (globalSendList.length > 0) {
mainSendList = mainSendList.concat(globalSendList);
Expand Down

0 comments on commit 8e6fb32

Please sign in to comment.