Repository: cloudstack Updated Branches: refs/heads/4.3 99198738f -> 885c02dbd
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.ya...@shapeblue.com> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/885c02db Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/885c02db Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/885c02db Branch: refs/heads/4.3 Commit: 885c02dbd8b40d654f4a84fca8474ff88bc7ca5e Parents: 9919873 Author: Rohit Yadav <rohit.ya...@shapeblue.com> Authored: Wed Sep 10 11:29:30 2014 +0200 Committer: Rohit Yadav <rohit.ya...@shapeblue.com> Committed: Wed Sep 10 11:34:58 2014 +0200 ---------------------------------------------------------------------- server/src/com/cloud/alert/AlertManagerImpl.java | 2 +- usage/src/com/cloud/usage/UsageAlertManagerImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/885c02db/server/src/com/cloud/alert/AlertManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/alert/AlertManagerImpl.java b/server/src/com/cloud/alert/AlertManagerImpl.java index 3786443..d8f51ea 100755 --- a/server/src/com/cloud/alert/AlertManagerImpl.java +++ b/server/src/com/cloud/alert/AlertManagerImpl.java @@ -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); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/885c02db/usage/src/com/cloud/usage/UsageAlertManagerImpl.java ---------------------------------------------------------------------- diff --git a/usage/src/com/cloud/usage/UsageAlertManagerImpl.java b/usage/src/com/cloud/usage/UsageAlertManagerImpl.java index 01e6bec..480bf47 100644 --- a/usage/src/com/cloud/usage/UsageAlertManagerImpl.java +++ b/usage/src/com/cloud/usage/UsageAlertManagerImpl.java @@ -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);