You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/03/06 13:06:11 UTC

stratos git commit: Improving to log factor at child scaling event receipt

Repository: stratos
Updated Branches:
  refs/heads/master ae202e48e -> 514a112f5


Improving to log factor at child scaling event receipt


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/514a112f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/514a112f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/514a112f

Branch: refs/heads/master
Commit: 514a112f52ceaa4729af3cc63d0a9c7369cc7fa1
Parents: ae202e4
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Fri Mar 6 17:35:58 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Fri Mar 6 17:36:05 2015 +0530

----------------------------------------------------------------------
 .../monitor/component/ParentComponentMonitor.java           | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/514a112f/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java
index 8d24b5a..e81129a 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java
@@ -229,10 +229,11 @@ public abstract class ParentComponentMonitor extends Monitor implements Runnable
 
     @Override
     public void onChildScalingEvent(ScalingEvent scalingEvent) {
-        log.info("Child scaling event received to [parent]: " + this.getId()
-                + ", [network partition]: " + scalingEvent.getNetworkPartitionId()
-                + ", [event] " + scalingEvent.getId() + ", [group instance] " + scalingEvent.getInstanceId());
-
+        if(log.isInfoEnabled()) {
+            log.info(String.format("Child scaling event received to [parent] %s [network-partition] %s [event-id] %s " +
+                    "[group-instance] %s [factor] %s", this.getId(), scalingEvent.getNetworkPartitionId(),
+                    scalingEvent.getId(), scalingEvent.getInstanceId(), scalingEvent.getFactor()));
+        }
         String networkPartitionId = scalingEvent.getNetworkPartitionId();
         String instanceId = scalingEvent.getInstanceId();
         String id = scalingEvent.getId();