You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2014/07/18 15:42:16 UTC
[05/12] git commit: demote dull log messages to 'trace'
demote dull log messages to 'trace'
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/920a0928
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/920a0928
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/920a0928
Branch: refs/heads/master
Commit: 920a0928445799d01aef6d88654553125837803e
Parents: e8f7283
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Thu Jul 17 16:06:58 2014 -0400
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Jul 18 09:15:17 2014 -0400
----------------------------------------------------------------------
.../brooklyn/entity/basic/EntityDynamicType.java | 16 ++++++++--------
.../management/internal/LocalUsageManager.java | 11 ++++++-----
2 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/920a0928/core/src/main/java/brooklyn/entity/basic/EntityDynamicType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/basic/EntityDynamicType.java b/core/src/main/java/brooklyn/entity/basic/EntityDynamicType.java
index 2d298d7..468e538 100644
--- a/core/src/main/java/brooklyn/entity/basic/EntityDynamicType.java
+++ b/core/src/main/java/brooklyn/entity/basic/EntityDynamicType.java
@@ -300,7 +300,7 @@ public class EntityDynamicType {
Effector<?> overwritten = result.put(eff.getName(), eff);
Field overwrittenFieldSource = fieldSources.put(eff.getName(), f);
if (overwritten!=null && !Effectors.sameInstance(overwritten, eff)) {
- LOG.debug("multiple definitions for effector {} on {}; preferring {} from {} to {} from {}", new Object[] {
+ LOG.trace("multiple definitions for effector {} on {}; preferring {} from {} to {} from {}", new Object[] {
eff.getName(), (optionalEntity != null ? optionalEntity : clazz), eff, f, overwritten,
overwrittenFieldSource});
}
@@ -326,7 +326,7 @@ public class EntityDynamicType {
result.put(eff.getName(), eff);
Method overwrittenMethodSource = methodSources.put(eff.getName(), m);
Field overwrittenFieldSource = fieldSources.remove(eff.getName());
- LOG.debug("multiple definitions for effector {} on {}; preferring {} from {} to {} from {}", new Object[] {
+ LOG.trace("multiple definitions for effector {} on {}; preferring {} from {} to {} from {}", new Object[] {
eff.getName(), (optionalEntity != null ? optionalEntity : clazz), eff, m, overwritten,
(overwrittenMethodSource != null ? overwrittenMethodSource : overwrittenFieldSource)});
}
@@ -359,8 +359,8 @@ public class EntityDynamicType {
Field source = sources.put(sens.getName(), f);
if (overwritten!=null && overwritten != sens) {
if (sens instanceof HasConfigKey) {
- // probably overriding defaults, just log as debug (there will be add'l logging in config key section)
- LOG.debug("multiple definitions for config sensor {} on {}; preferring {} from {} to {} from {}", new Object[] {
+ // probably overriding defaults, just log low level (there will be add'l logging in config key section)
+ LOG.trace("multiple definitions for config sensor {} on {}; preferring {} from {} to {} from {}", new Object[] {
sens.getName(), optionalEntity!=null ? optionalEntity : clazz, sens, f, overwritten, source});
} else {
LOG.warn("multiple definitions for sensor {} on {}; preferring {} from {} to {} from {}", new Object[] {
@@ -441,8 +441,8 @@ public class EntityDynamicType {
ConfigKey<? extends Object> lowerV = lower==null ? null : lower.equals(k.field) ? k.value : best.value;
if (best.value == k.value) {
// same value doesn't matter which we take (but take lower if there is one)
- if (LOG.isDebugEnabled())
- LOG.debug("multiple definitions for config key {} on {}; same value {}; " +
+ if (LOG.isTraceEnabled())
+ LOG.trace("multiple definitions for config key {} on {}; same value {}; " +
"from {} and {}, preferring {}",
new Object[] {
best.value.getName(), optionalEntity!=null ? optionalEntity : clazz,
@@ -451,8 +451,8 @@ public class EntityDynamicType {
best = new FieldAndValue<ConfigKey<?>>(lower!=null ? lower : best.field, best.value);
} else if (lower!=null) {
// different value, but one clearly lower (in type hierarchy)
- if (LOG.isDebugEnabled())
- LOG.debug("multiple definitions for config key {} on {}; " +
+ if (LOG.isTraceEnabled())
+ LOG.trace("multiple definitions for config key {} on {}; " +
"from {} and {}, preferring lower {}, value {}",
new Object[] {
best.value.getName(), optionalEntity!=null ? optionalEntity : clazz,
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/920a0928/core/src/main/java/brooklyn/management/internal/LocalUsageManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/management/internal/LocalUsageManager.java b/core/src/main/java/brooklyn/management/internal/LocalUsageManager.java
index f825bc3..65efe44 100644
--- a/core/src/main/java/brooklyn/management/internal/LocalUsageManager.java
+++ b/core/src/main/java/brooklyn/management/internal/LocalUsageManager.java
@@ -69,7 +69,7 @@ public class LocalUsageManager implements UsageManager {
@Override
public void recordApplicationEvent(Application app, Lifecycle state) {
- log.debug("Storing location lifecycle event: application {} in state {};", new Object[] {app, state});
+ log.debug("Storing application lifecycle usage event: application {} in state {}", new Object[] {app, state});
ConcurrentMap<String, ApplicationUsage> eventMap = managementContext.getStorage().getMap(APPLICATION_USAGE_KEY);
synchronized (mutex) {
ApplicationUsage usage = eventMap.get(app.getId());
@@ -100,18 +100,18 @@ public class LocalUsageManager implements UsageManager {
checkNotNull(loc, "location");
checkNotNull(state, "state of location %s", loc);
if (loc.getId() == null) {
- log.error("Ignoring location lifecycle event for {} (state {}), because location has no id", loc, state);
+ log.error("Ignoring location lifecycle usage event for {} (state {}), because location has no id", loc, state);
return;
}
if (managementContext.getStorage() == null) {
- log.warn("Cannot store location lifecycle event for {} (state {}), because storage not available", loc, state);
+ log.warn("Cannot store location lifecycle usage event for {} (state {}), because storage not available", loc, state);
return;
}
Object callerContext = loc.getConfig(LocationConfigKeys.CALLER_CONTEXT);
if (callerContext != null && callerContext instanceof Entity) {
- log.debug("Storing location lifecycle event: location {} in state {}; caller context {}", new Object[] {loc, state, callerContext});
+ log.debug("Storing location lifecycle usage event: location {} in state {}; caller context {}", new Object[] {loc, state, callerContext});
Entity caller = (Entity) callerContext;
String entityTypeName = caller.getEntityType().getName();
@@ -128,7 +128,8 @@ public class LocalUsageManager implements UsageManager {
usageMap.put(loc.getId(), usage);
}
} else {
- log.debug("Not recording location-event for {} in state {}, because no caller context", new Object[] {loc, state});
+ // normal for high-level locations
+ log.trace("Not recording location lifecycle usage event for {} in state {}, because no caller context", new Object[] {loc, state});
}
}