brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [3/8] incubator-brooklyn git commit: Log subsequent isRunning exceptions at debug level
Date Mon, 11 May 2015 13:32:56 GMT
Log subsequent isRunning exceptions at debug level


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/29bcd8e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/29bcd8e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/29bcd8e3

Branch: refs/heads/master
Commit: 29bcd8e36821163afb43d40748e02d4674d29c31
Parents: 5a4e83a
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Tue May 5 18:41:12 2015 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Tue May 5 18:41:12 2015 +0300

----------------------------------------------------------------------
 .../java/brooklyn/entity/basic/SoftwareProcessImpl.java     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/29bcd8e3/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessImpl.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessImpl.java b/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessImpl.java
index eedc546..8df4457 100644
--- a/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessImpl.java
+++ b/software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessImpl.java
@@ -505,7 +505,12 @@ public abstract class SoftwareProcessImpl extends AbstractEntity implements
Soft
 
                 isRunningResult = false;
                 if (driver != null) {
-                    log.error("checked " + this + ", 'is running' threw an exception", e);
+                    String msg = "checked " + this + ", 'is running' threw an exception;
logging subsequent exceptions at debug level";
+                    if (firstFailure == null) {
+                        log.error(msg, e);
+                    } else {
+                        log.debug(msg, e);
+                    }
                 } else {
                     // provide extra context info, as we're seeing this happen in strange
circumstances
                     log.error(this+" concurrent start and shutdown detected", e);
@@ -522,7 +527,7 @@ public abstract class SoftwareProcessImpl extends AbstractEntity implements
Soft
             String msg = "Software process entity "+this+" did not pass is-running check
within "+
                     "the required "+startTimeout+" limit ("+timer.getDurationElapsed().toStringRounded()+"
elapsed)";
             if (firstFailure != null) {
-                msg += "; check failed with exception: " + firstFailure.getMessage();
+                msg += "; check failed at least once with exception: " + firstFailure.getMessage()
+ ", see logs for details";
             }
             log.warn(msg+" (throwing)");
             ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);


Mime
View raw message