stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nirmal070...@apache.org
Subject [1/2] git commit: Improvements to logs.
Date Mon, 13 Oct 2014 09:39:42 GMT
Repository: stratos
Updated Branches:
  refs/heads/master 61e7c922c -> 8c6658729


Improvements to logs.


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

Branch: refs/heads/master
Commit: 8c665872977ff449a1e6c73fd29dad3b318bb9ee
Parents: 881a369
Author: Nirmal Fernando <nirmal070125@gmail.com>
Authored: Mon Oct 13 15:08:50 2014 +0530
Committer: Nirmal Fernando <nirmal070125@gmail.com>
Committed: Mon Oct 13 15:09:07 2014 +0530

----------------------------------------------------------------------
 .../topology/TopologyEventPublisher.java           |  4 ++--
 .../model/TopologyClusterInformationModel.java     |  2 +-
 .../stratos/messaging/domain/topology/Cluster.java | 17 +++++++++--------
 .../stratos/messaging/domain/topology/Member.java  |  8 ++++++++
 .../topology/InstanceSpawnedMessageProcessor.java  |  5 +++--
 5 files changed, 23 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8c665872/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyEventPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyEventPublisher.java
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyEventPublisher.java
index 74ced5c..db3059d 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyEventPublisher.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/topology/TopologyEventPublisher.java
@@ -154,9 +154,9 @@ public class TopologyEventPublisher {
 				.toJavaUtilProperties(context.getProperties()));
 		if (log.isInfoEnabled()) {
 			log.info(String
-					.format("Publishing instance spawned event: [service] %s [cluster] %s [network-partition]
%s [partition] %s [member] %s [lb-cluster-id] %s",
+					.format("Publishing instance spawned event: [service] %s [cluster] %s [network-partition]
%s [partition] %s [member] %s [lb-cluster-id] %s [properties] %s",
 							serviceName, clusterId, networkPartitionId,
-							partitionId, memberId, lbClusterId));
+							partitionId, memberId, lbClusterId, context.getProperties()));
 		}
 		publishEvent(instanceSpawnedEvent);
 	}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8c665872/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java
b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java
index b947b1c..a926ea8 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/topology/model/TopologyClusterInformationModel.java
@@ -72,7 +72,7 @@ public class TopologyClusterInformationModel {
     public void addCluster (Cluster cluster) {
 
         if(log.isDebugEnabled()) {
-    		log.debug(" Adding cluster ["+cluster.getClusterId()+"] ");
+    		log.debug(" Adding cluster ["+cluster+"] ");
     	}
     	clusterIdToClusterMap.put(cluster.getClusterId(), cluster);
     	serviceNameToClusterMap.put(cluster.getServiceName(), cluster);

http://git-wip-us.apache.org/repos/asf/stratos/blob/8c665872/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
index 04e60e3..9d6b301 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
@@ -156,14 +156,6 @@ public class Cluster implements Serializable {
 		this.isKubernetesCluster = isKubernetesCluster;
 	}
 
-	@Override
-    public String toString() {
-        return "Cluster [serviceName=" + serviceName + ", clusterId=" + clusterId +
-                ", autoscalePolicyName=" + autoscalePolicyName + ", deploymentPolicyName="
+
-                deploymentPolicyName + ", hostNames=" + hostNames + ", tenantRange=" + tenantRange
+
-                ", isLbCluster=" + isLbCluster + ", isKubernetesCluster=" + isKubernetesCluster
+ ", properties=" + properties + "]";
-    }
-
     /**
      * Check whether a given tenant id is in tenant range of the cluster.
      *
@@ -219,5 +211,14 @@ public class Cluster implements Serializable {
     public void setStatus(ClusterStatus status) {
         this.status = status;
     }
+
+    @Override
+    public String toString() {
+        return "Cluster [serviceName=" + serviceName + ", clusterId=" + clusterId + ", autoscalePolicyName="
+                + autoscalePolicyName + ", deploymentPolicyName=" + deploymentPolicyName
+ ", hostNames=" + hostNames
+                + ", tenantRange=" + tenantRange + ", isLbCluster=" + isLbCluster + ", isKubernetesCluster="
+                + isKubernetesCluster + ", memberMap=" + memberMap + ", status=" + status
+                + ", loadBalanceAlgorithmName=" + loadBalanceAlgorithmName + ", properties="
+ properties + "]";
+    }
 }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8c665872/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
index 4a3bf17..c3d9e79 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
@@ -151,5 +151,13 @@ public class Member implements Serializable {
         this.memberPublicIp = memberPublicIp;
     }
 
+    @Override
+    public String toString() {
+        return "Member [serviceName=" + serviceName + ", clusterId=" + clusterId + ", networkPartitionId="
+                + networkPartitionId + ", partitionId=" + partitionId + ", memberId=" + memberId
+ ", portMap="
+                + portMap + ", memberPublicIp=" + memberPublicIp + ", status=" + status +
", memberIp=" + memberIp
+                + ", properties=" + properties + ", lbClusterId=" + lbClusterId + "]";
+    }
+
 }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8c665872/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/InstanceSpawnedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/InstanceSpawnedMessageProcessor.java
b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/InstanceSpawnedMessageProcessor.java
index 8e4e1b1..db7cc20 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/InstanceSpawnedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/InstanceSpawnedMessageProcessor.java
@@ -118,10 +118,11 @@ public class InstanceSpawnedMessageProcessor extends MessageProcessor
{
             	cluster.addMember(member);
             	
             	if (log.isInfoEnabled()) {
-            		log.info(String.format("Member created: [service] %s [cluster] %s [member]
%s",
+            		log.info(String.format("Member created: [service] %s [cluster] %s [member]
%s [properties] %s",
             				event.getServiceName(),
             				event.getClusterId(),
-            				event.getMemberId()));
+            				event.getMemberId(),
+            				event.getProperties()));
             	}
             }
 


Mime
View raw message