Repository: stratos Updated Branches: refs/heads/4.0.0-grouping bfcaf0f54 -> d3a1e64b5
add logs Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d7ee8405 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d7ee8405 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d7ee8405 Branch: refs/heads/4.0.0-grouping Commit: d7ee8405eda6e0877bbecc5a90fa71dafc75ddc1 Parents: 37bbe69 Author: Udara Liyanage <[email protected]> Authored: Wed Sep 24 22:15:10 2014 +0530 Committer: Udara Liyanage <[email protected]> Committed: Wed Sep 24 22:15:10 2014 +0530 ---------------------------------------------------------------------- .../metadataservice/registry/CarbonRegistry.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/d7ee8405/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java b/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java index 520c846..d721c8b 100644 --- a/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java +++ b/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java @@ -217,6 +217,7 @@ public class CarbonRegistry extends AbstractAdmin implements DataStore { regResource.setProperty(property.getKey(), Arrays.asList(property.getValues())); tempRegistry.put(resourcePath, regResource); + log.info(String.format("Property %s is added to cluster %s of application %s", property.getKey(), clusterId, applicationId)); } @@ -232,9 +233,7 @@ public class CarbonRegistry extends AbstractAdmin implements DataStore { } tempRegistry.put(resourcePath, regResource); - if(log.isDebugEnabled()){ - log.debug("A resource added to: " + resourcePath); - } + log.info(String.format("Properties are added to cluster %s of application %s", clusterId, applicationName)); } public void addPropertiesToApplication(String applicationId, NewProperty[] properties) throws RegistryException { @@ -247,6 +246,7 @@ public class CarbonRegistry extends AbstractAdmin implements DataStore { } tempRegistry.put(resourcePath, regResource); + log.info(String.format("Properties are added to application %s", applicationId)); } public void addPropertyToApplication(String applicationId, NewProperty property) throws RegistryException { @@ -255,6 +255,7 @@ public class CarbonRegistry extends AbstractAdmin implements DataStore { Resource regResource = createOrGetResourceforApplication(tempRegistry, resourcePath); regResource.setProperty(property.getKey(), (Arrays.asList(property.getValues()))); tempRegistry.put(resourcePath, regResource); + log.info(String.format("Property %s is added to application %s ", property.getKey(), applicationId)); } public List<NewProperty> getPropertiesOfApplication(String applicationId) throws RegistryException { @@ -295,6 +296,9 @@ public class CarbonRegistry extends AbstractAdmin implements DataStore { regResource = tempRegistry.get(resourcePath); }else{ regResource = tempRegistry.newCollection(); + if(log.isDebugEnabled()){ + log.debug("Registry resource is create at path " + regResource.getPath() + " for application"); + } } return regResource; } @@ -309,6 +313,9 @@ public class CarbonRegistry extends AbstractAdmin implements DataStore { regResource = tempRegistry.get(resourcePath); }else{ regResource = tempRegistry.newResource(); + if(log.isDebugEnabled()){ + log.debug("Registry resource is create at path for cluster" + regResource.getPath() + " for cluster"); + } } return regResource; }
