mirror of https://github.com/apache/cloudstack.git
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 885c02dbd8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Conflicts:
server/src/com/cloud/alert/AlertManagerImpl.java
usage/src/com/cloud/usage/UsageAlertManagerImpl.java
This commit is contained in:
parent
81d5dd9bcd
commit
91fd8d7cd5
|
|
@ -252,7 +252,7 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi
|
|||
_emailAlert.sendAlert(alertType, dataCenterId, podId, null, subject, body);
|
||||
} else {
|
||||
s_alertsLogger.warn(" alertType:: " + alertType + " // dataCenterId:: " + dataCenterId + " // podId:: " + podId +
|
||||
" // message:: " + subject);
|
||||
" // message:: " + subject + " // body:: " + body);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.error("Problem sending email alert", ex);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class UsageAlertManagerImpl extends ManagerBase implements AlertManager {
|
|||
_emailAlert.sendAlert(alertType, dataCenterId, podId, subject, body);
|
||||
} else {
|
||||
s_alertsLogger.warn(" alertType:: " + alertType + " // dataCenterId:: " + dataCenterId + " // podId:: " + podId + " // clusterId:: " + null +
|
||||
" // message:: " + subject);
|
||||
" // message:: " + subject + " // body:: " + body);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.error("Problem sending email alert", ex);
|
||||
|
|
|
|||
Loading…
Reference in New Issue