Skip to content

Commit 91fd8d7

Browse files
committed
CLOUDSTACK-7528: More verbose logging when sending alert fails
When sendAlert is called on an AlertManager impl, if it fails it logs that something was wrong but does not log the body of the issue/error. This means we tell the user/admin that there was an issue but don't share the "issue" with them at all as the email alert fail (or that they were not initialized). Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> (cherry picked from commit 885c02d) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> Conflicts: server/src/com/cloud/alert/AlertManagerImpl.java usage/src/com/cloud/usage/UsageAlertManagerImpl.java
1 parent 81d5dd9 commit 91fd8d7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

server/src/com/cloud/alert/AlertManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public void sendAlert(AlertType alertType, long dataCenterId, Long podId, String
252252
_emailAlert.sendAlert(alertType, dataCenterId, podId, null, subject, body);
253253
} else {
254254
s_alertsLogger.warn(" alertType:: " + alertType + " // dataCenterId:: " + dataCenterId + " // podId:: " + podId +
255-
" // message:: " + subject);
255+
" // message:: " + subject + " // body:: " + body);
256256
}
257257
} catch (Exception ex) {
258258
s_logger.error("Problem sending email alert", ex);

usage/src/com/cloud/usage/UsageAlertManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void sendAlert(AlertType alertType, long dataCenterId, Long podId, String
105105
_emailAlert.sendAlert(alertType, dataCenterId, podId, subject, body);
106106
} else {
107107
s_alertsLogger.warn(" alertType:: " + alertType + " // dataCenterId:: " + dataCenterId + " // podId:: " + podId + " // clusterId:: " + null +
108-
" // message:: " + subject);
108+
" // message:: " + subject + " // body:: " + body);
109109
}
110110
} catch (Exception ex) {
111111
s_logger.error("Problem sending email alert", ex);

0 commit comments

Comments
 (0)