marking some verbose logs as debug logs

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

Branch: refs/heads/stratos-4.1.x
Commit: 40b9fa6e1d8bff7f3d82bf7dfb3410087db71102
Parents: 60c1a14
Author: Isuru Haththotuwa <[email protected]>
Authored: Tue Nov 17 14:21:58 2015 +0530
Committer: Isuru Haththotuwa <[email protected]>
Committed: Tue Nov 17 15:32:08 2015 +0530

----------------------------------------------------------------------
 .../controller/util/CloudControllerUtil.java    | 30 ++++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/40b9fa6e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
index e5af849..54cde0b 100644
--- 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
+++ 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
@@ -327,12 +327,14 @@ public class CloudControllerUtil {
             }
         }
 
-        //TODO: make debug
-        logProperties(iaasProvider.getType(), iaasProvider.getProperties(), 
cartridge.getType(),
-                partition.getId());
+        if (log.isDebugEnabled()) {
+            logProperties(iaasProvider.getType(), 
iaasProvider.getProperties(), cartridge.getType(),
+                    partition.getId());
+        }
 
-        //TODO: make debug
-        logNetworkInterfaces(iaasProvider.getType(), 
iaasProvider.getNetworkInterfaces());
+        if (log.isDebugEnabled()) {
+            logNetworkInterfaces(iaasProvider.getType(), 
iaasProvider.getNetworkInterfaces());
+        }
 
         return iaasProvider;
     }
@@ -402,16 +404,14 @@ public class CloudControllerUtil {
                                           String attributeDefinedInCC, boolean 
logInfo) throws InvalidIaasProviderException {
 
         if (attributeDefinedInCartridge != null) {
-            // TODO: make debug
-            if (logInfo) {
-                log.info("Selected " + attributeName + "=" +
+            if (log.isDebugEnabled() && logInfo) {
+                log.debug("Selected " + attributeName + "=" +
                         attributeDefinedInCartridge + " from Cartridge 
Definition");
             }
             return attributeDefinedInCartridge;
         } else if (attributeDefinedInCC != null) {
-            // TODO: make debug
-            if (logInfo) {
-                log.info("Selected " + attributeName + "=" +
+            if (log.isDebugEnabled() && logInfo) {
+                log.debug("Selected " + attributeName + "=" +
                         attributeDefinedInCC + " from cloud-controller.xml 
configuration");
             }
             return attributeDefinedInCC;
@@ -426,10 +426,10 @@ public class CloudControllerUtil {
     private static void logNetworkInterfaces (String iaasProviderType, 
NetworkInterface[] networkInterfaces) {
 
         if (networkInterfaces != null) {
-            log.info("All Network interfaces in IaasProvider object for type: 
" +
+            log.debug("All Network interfaces in IaasProvider object for type: 
" +
                     iaasProviderType);
             for (NetworkInterface nwInterface : networkInterfaces) {
-                log.info("Interface " + nwInterface.toString());
+                log.debug("Interface " + nwInterface.toString());
             }
         }
     }
@@ -438,11 +438,11 @@ public class CloudControllerUtil {
                                       String cartridgeType, String 
partitionId) {
 
         if (properties != null) {
-            log.info("Properties defined in IaasProvider object for type: " +
+            log.debug("Properties defined in IaasProvider object for type: " +
                     iaasProviderType + ", cartridge type: " + cartridgeType + 
", partition: " +
                     partitionId);
             for (Map.Entry<String, String> property : properties.entrySet()) {
-                log.info("Property key: " + property.getKey() + ", value: " +
+                log.debug("Property key: " + property.getKey() + ", value: " +
                         property.getValue());
             }
         }

Reply via email to