stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject stratos git commit: Changing info logs to debug to reduce number of logs in the application deployment process
Date Sun, 21 Dec 2014 20:01:43 GMT
Repository: stratos
Updated Branches:
  refs/heads/master 69d2f3437 -> 14cc39c9a


Changing info logs to debug to reduce number of logs in the application deployment process


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

Branch: refs/heads/master
Commit: 14cc39c9a46a92861837d7226529279ad266f173
Parents: 69d2f34
Author: Imesh Gunaratne <imesh@apache.org>
Authored: Mon Dec 22 01:31:32 2014 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Mon Dec 22 01:31:32 2014 +0530

----------------------------------------------------------------------
 .../parser/DefaultApplicationParser.java           |  6 +++---
 .../rest/endpoint/api/StratosApiV41Utils.java      | 17 ++++++++++-------
 2 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/14cc39c9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
index 7249ce1..f5a1f16 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
@@ -277,9 +277,9 @@ public class DefaultApplicationParser implements ApplicationParser {
 
         }
 
-
-        log.info("Application with id " + appCtxt.getApplicationId() + " parsed successfully");
-
+        if(log.isDebugEnabled()) {
+            log.debug("Application with id " + appCtxt.getApplicationId() + " parsed successfully");
+        }
         return application;
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/14cc39c9/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 db68bd5..1cffecb 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
@@ -98,8 +98,9 @@ public class StratosApiV41Utils {
     public static void addCartridge(CartridgeDefinitionBean cartridgeDefinitionBean, ConfigurationContext
ctxt,
                                        String userName, String tenantDomain) throws RestAPIException
{
 
-        log.info(String.format("Starting to deploy a cartridge: [type] %s " , cartridgeDefinitionBean.getType()));
-
+        if(log.isDebugEnabled()) {
+            log.debug(String.format("Starting to add cartridge: [cartridge-type] %s ", cartridgeDefinitionBean.getType()));
+        }
         CartridgeConfig cartridgeConfig = ObjectConverter.convertCartridgeDefinitionBeanToStubCartridgeConfig(cartridgeDefinitionBean);
         if (cartridgeConfig == null) {
             throw new RestAPIException("Could not read cartridge definition, cartridge deployment
failed");
@@ -112,7 +113,9 @@ public class StratosApiV41Utils {
         } catch (ADCException e) {
             throw new RestAPIException(e);
         }
-        log.info(String.format("Successfully deployed cartridge: [cartridge-type] %s " ,
cartridgeDefinitionBean.getType()));
+        if(log.isDebugEnabled()) {
+            log.debug(String.format("Successfully added cartridge: [cartridge-type] %s ",
cartridgeDefinitionBean.getType()));
+        }
     }
 
     public static void removeCartridge(String cartridgeType) throws RestAPIException {
@@ -124,16 +127,16 @@ public class StratosApiV41Utils {
             try {
                 cartridgeInfo = cloudControllerServiceClient.getCartridgeInfo(cartridgeType);
             } catch (RemoteException e) {
-                log.error(String.format("Could not find cartridge: [type] %s ", cartridgeType));
+                log.error(String.format("Could not find cartridge: [cartridge-type] %s ",
cartridgeType));
                 throw new RestAPIException(e);
 
             } catch (CloudControllerServiceCartridgeNotFoundExceptionException e) {
-                log.error(String.format("Could not find cartridge: [type]  %s " , cartridgeType));
+                log.error(String.format("Could not find cartridge: [cartridge-type]  %s "
, cartridgeType));
                 throw new RestAPIException(e);
             }
 
             if (cartridgeInfo == null) {
-                String errorMsg = String.format("Could not find cartridge: [type] %s ", cartridgeType);
+                String errorMsg = String.format("Could not find cartridge: [cartridge-type]
%s ", cartridgeType);
                 log.error(errorMsg);
                 throw new RestAPIException(errorMsg);
             }
@@ -543,7 +546,7 @@ public class StratosApiV41Utils {
 
     public static void addAutoscalingPolicy(AutoscalePolicy autoscalePolicyBean) throws RestAPIException
{
 
-        log.info(String.format("Deploying autoscaling policy: [id] %s", autoscalePolicyBean.getId()));
+        log.info(String.format("Adding autoscaling policy: [id] %s", autoscalePolicyBean.getId()));
 
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
         if (autoscalerServiceClient != null) {


Mime
View raw message