Modifying log messages to display uuid

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

Branch: refs/heads/tenantisolation
Commit: 70da581c39ca64aa195185ced3bba3e54b23a551
Parents: 3accca7
Author: Dinithi <[email protected]>
Authored: Mon Jun 29 18:29:41 2015 +0530
Committer: Dinithi <[email protected]>
Committed: Mon Jun 29 18:29:41 2015 +0530

----------------------------------------------------------------------
 .../org/apache/stratos/rest/endpoint/api/StratosApiV41.java    | 5 +++--
 .../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java   | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/70da581c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 08005c6..b5e5bc0 100644
--- 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -1432,7 +1432,8 @@ public class StratosApiV41 extends AbstractApi {
                     ResponseMessageBean.ERROR, "Autoscaling policy is 
invalid")).build();
         }
         return Response.ok().entity(new 
ResponseMessageBean(ResponseMessageBean.SUCCESS,
-                String.format("Autoscaling policy updated successfully: 
[autoscale-policy] %s",
+                String.format("Autoscaling policy updated successfully: 
[autoscale-policy-uuid] %s " +
+                                "[autoscale-policy-id] %s", 
autoscalePolicy.getUuid(),
                         autoscalePolicy.getId()))).build();
     }
 
@@ -1461,7 +1462,7 @@ public class StratosApiV41 extends AbstractApi {
                     ResponseMessageBean.ERROR, "Autoscaling policy not 
found")).build();
         }
         return Response.ok().entity(new 
ResponseMessageBean(ResponseMessageBean.SUCCESS,
-                String.format("Autoscaling policy deleted successfully: 
[autoscale-policy] %s",
+                String.format("Autoscaling policy deleted successfully: 
[autoscale-policy-id] %s",
                         autoscalingPolicyId))).build();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/70da581c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 20929bb..674aab3 100644
--- 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -847,7 +847,7 @@ public class StratosApiV41Utils {
             AutoscalerServicePolicyDoesNotExistExceptionException,
             AutoscalerServiceUnremovablePolicyExceptionException {
 
-        log.info(String.format("Removing autoscaling policy: [id] %s", 
autoscalePolicyId));
+        log.info(String.format("Removing autoscaling policy: 
[autoscaling-policy-id] %s", autoscalePolicyId));
 
         AutoscalerServiceClient autoscalerServiceClient = 
getAutoscalerServiceClient();
         if (autoscalerServiceClient != null) {
@@ -926,8 +926,8 @@ public class StratosApiV41Utils {
             }
             autoscalePolicyBean = 
ObjectConverter.convertStubAutoscalePolicyToAutoscalePolicy(autoscalePolicy);
         } catch (RemoteException e) {
-            String errorMsg = "Error while getting information for autoscaling 
policy with id " +
-                    autoscalePolicyId + ".  Cause: " + e.getMessage();
+            String errorMsg = "Error while getting information for autoscaling 
policy with id " + autoscalePolicyId +
+                    ".  Cause: " + e.getMessage();
             log.error(errorMsg, e);
             throw new RestAPIException(errorMsg, e);
         }

Reply via email to