Skip to content

Commit 885c02d

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>
1 parent 9919873 commit 885c02d

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
@@ -240,7 +240,7 @@ public void sendAlert(AlertType alertType, long dataCenterId, Long podId, String
240240
_emailAlert.sendAlert(alertType, dataCenterId, podId, null, subject, body);
241241
} else {
242242
s_alertsLogger.warn(" alertType:: " + alertType + " // dataCenterId:: " + dataCenterId + " // podId:: "
243-
+ podId + " // clusterId:: " + null + " // message:: " + subject );
243+
+ podId + " // clusterId:: " + null + " // message:: " + subject + " // body:: " + body );
244244
}
245245
} catch (Exception ex) {
246246
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
@@ -103,7 +103,7 @@ public void sendAlert(AlertType alertType, long dataCenterId, Long podId, String
103103
_emailAlert.sendAlert(alertType, dataCenterId, podId, subject, body);
104104
} else {
105105
s_alertsLogger.warn(" alertType:: " + alertType + " // dataCenterId:: " + dataCenterId + " // podId:: "
106-
+ podId + " // clusterId:: " + null + " // message:: " + subject );
106+
+ podId + " // clusterId:: " + null + " // message:: " + subject + " // body:: " + body);
107107
}
108108
} catch (Exception ex) {
109109
s_logger.error("Problem sending email alert", ex);

0 commit comments

Comments
 (0)