You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/09/10 11:39:24 UTC

git commit: updated refs/heads/master to 91fd8d7

Repository: cloudstack
Updated Branches:
  refs/heads/master 81d5dd9bc -> 91fd8d7cd


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 <ro...@shapeblue.com>
(cherry picked from commit 885c02dbd8b40d654f4a84fca8474ff88bc7ca5e)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>

Conflicts:
	server/src/com/cloud/alert/AlertManagerImpl.java
	usage/src/com/cloud/usage/UsageAlertManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/91fd8d7c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/91fd8d7c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/91fd8d7c

Branch: refs/heads/master
Commit: 91fd8d7cd5d5a83bf75f5f2972ad2eb2a4a07694
Parents: 81d5dd9
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Wed Sep 10 11:29:30 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Sep 10 11:38:47 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/91fd8d7c/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 1dba13b..3f599a1 100755
--- a/server/src/com/cloud/alert/AlertManagerImpl.java
+++ b/server/src/com/cloud/alert/AlertManagerImpl.java
@@ -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);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91fd8d7c/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 67bb702..3c55f57 100644
--- a/usage/src/com/cloud/usage/UsageAlertManagerImpl.java
+++ b/usage/src/com/cloud/usage/UsageAlertManagerImpl.java
@@ -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);