Updated Branches:
  refs/heads/master 77436902d -> 052946499

Adding logs before throwing where system propeties are not available


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

Branch: refs/heads/master
Commit: 052946499654e4dc7a461b135dfbbdf1063d5430
Parents: 7743690
Author: Lahiru Sandaruwan <[email protected]>
Authored: Thu Jan 9 14:51:34 2014 +0530
Committer: Lahiru Sandaruwan <[email protected]>
Committed: Thu Jan 9 14:51:34 2014 +0530

----------------------------------------------------------------------
 .../org/apache/stratos/cartridge/agent/CartridgeAgent.java  | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/05294649/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/CartridgeAgent.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/CartridgeAgent.java
 
b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/CartridgeAgent.java
index 62b39e0..0b1091a 100644
--- 
a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/CartridgeAgent.java
+++ 
b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/CartridgeAgent.java
@@ -36,16 +36,25 @@ public class CartridgeAgent implements Runnable {
 
         String jndiPropertiesDir = 
System.getProperty(CartridgeAgentConstants.JNDI_PROPERTIES_DIR);
         if(StringUtils.isBlank(jndiPropertiesDir)) {
+            if(log.isErrorEnabled()){
+                log.error(String.format("System property not found: %s", 
CartridgeAgentConstants.JNDI_PROPERTIES_DIR));
+            }
             throw new RuntimeException(String.format("System property not 
found: %s", CartridgeAgentConstants.JNDI_PROPERTIES_DIR));
         }
 
         String payloadPath = 
System.getProperty(CartridgeAgentConstants.PARAM_FILE_PATH);
         if(StringUtils.isBlank(payloadPath)) {
+            if(log.isErrorEnabled()){
+                log.error(String.format("System property not found: %s", 
CartridgeAgentConstants.PARAM_FILE_PATH));
+            }
             throw new RuntimeException(String.format("System property not 
found: %s", CartridgeAgentConstants.PARAM_FILE_PATH));
         }
 
         String extensionsDir = 
System.getProperty(CartridgeAgentConstants.EXTENSIONS_DIR);
         if(StringUtils.isBlank(extensionsDir)) {
+            if(log.isErrorEnabled()){
+                log.error(String.format("System property not found: %s", 
CartridgeAgentConstants.EXTENSIONS_DIR));
+            }
             throw new RuntimeException(String.format("System property not 
found: %s", CartridgeAgentConstants.EXTENSIONS_DIR));
         }
 

Reply via email to