brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/2] brooklyn-server git commit: Don't log the "No location resolving context found" error by default
Date Sun, 29 Jan 2017 20:16:42 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master b2ae1ccce -> 4c7581508


Don't log the "No location resolving context found" error by default

Turns out it's too chatty, with non-trivial callers to add calling context to.


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

Branch: refs/heads/master
Commit: 77b8833aeb942dd0520fb3d0e17703e2e74f08cc
Parents: a4e6995
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Fri Jan 27 14:31:26 2017 +0200
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Fri Jan 27 14:31:26 2017 +0200

----------------------------------------------------------------------
 .../brooklyn/core/location/internal/LocationConfigMap.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/77b8833a/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
b/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
index 6d08479..689f5f2 100644
--- a/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
+++ b/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
@@ -63,7 +63,10 @@ public class LocationConfigMap extends AbstractConfigMapImpl<Location>
{
         if (contextEntity != null) {
             return ((EntityInternal)contextEntity).getExecutionContext();
         } else {
-            log.debug("No resolving context found, will use global execution context. Could
lead to NPE on DSL resolving.");
+            // Known places we get called without entity context:
+            // * unmanaging entity and subsequently its location
+            // * EntityResource.listTasks(String, String) returning a Task<SshMachineLocation>
and calling toString() on the return value
+            log.trace("No resolving context found, will use global execution context. Could
lead to NPE on DSL resolving.");
             if (bo==null) return null;
             ManagementContext mgmt = ((AbstractLocation)bo).getManagementContext();
             if (mgmt==null) return null;


Mime
View raw message