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>
This commit is contained in:
parent
99198738fc
commit
885c02dbd8
|
|
@ -240,7 +240,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 + " // clusterId:: " + null + " // message:: " + subject );
|
||||
+ podId + " // clusterId:: " + null + " // message:: " + subject + " // body:: " + body );
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.error("Problem sending email alert", ex);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,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 );
|
||||
+ podId + " // clusterId:: " + null + " // message:: " + subject + " // body:: " + body);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.error("Problem sending email alert", ex);
|
||||
|
|
|
|||
Loading…
Reference in New Issue