brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [2/5] brooklyn-server git commit: Include entity in StaticSensor log statements
Date Wed, 13 Jul 2016 17:29:42 GMT
Include entity in StaticSensor log statements


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/0c0ec603
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/0c0ec603
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/0c0ec603

Branch: refs/heads/master
Commit: 0c0ec603d1c10628f426af6d713f69a538e28d8a
Parents: 8af60af
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Wed Jul 6 11:26:41 2016 +0100
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Wed Jul 6 12:02:07 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/core/sensor/StaticSensor.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/0c0ec603/core/src/main/java/org/apache/brooklyn/core/sensor/StaticSensor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/sensor/StaticSensor.java b/core/src/main/java/org/apache/brooklyn/core/sensor/StaticSensor.java
index 18978fa..a6a6170 100644
--- a/core/src/main/java/org/apache/brooklyn/core/sensor/StaticSensor.java
+++ b/core/src/main/java/org/apache/brooklyn/core/sensor/StaticSensor.java
@@ -83,15 +83,15 @@ public class StaticSensor<T> extends AddSensor<T> {
             public T call() throws Exception {
                 Maybe<T> v = resolveValue.get();
                 if (!v.isPresent()) {
-                    log.debug(this+" not setting sensor "+sensor+"; cannot resolve "+value+"
after timeout " + timeout);
+                    log.debug(this+" not setting sensor "+sensor+" on "+entity+"; cannot
resolve "+value+" after timeout " + timeout);
                     return null;
                 }
-                log.debug(this+" setting sensor "+sensor+" to "+v.get());
+                log.debug(this+" setting sensor "+sensor+" to "+v.get()+" on "+entity);
                 return entity.sensors().set(sensor, v.get());
             }
         }
-        Task<T> setValue = Tasks.<T>builder().displayName("setting " + sensor).body(new
SetValue()).build();
+        Task<T> setValue = Tasks.<T>builder().displayName("Setting " + sensor
+ " on " + entity).body(new SetValue()).build();
 
-        Entities.submit(entity, Tasks.sequential("resolving and setting " + sensor, resolveValue,
setValue));
+        Entities.submit(entity, Tasks.sequential("Resolving and setting " + sensor + " on
" + entity, resolveValue, setValue));
     }
 }


Mime
View raw message