diff --git a/assets/config/log4j.xml b/assets/config/log4j.xml
index bc0a7b33e9..c21c26b079 100644
--- a/assets/config/log4j.xml
+++ b/assets/config/log4j.xml
@@ -41,6 +41,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -73,8 +96,9 @@
-
+
+
diff --git a/opensrp-connector/src/main/java/org/opensrp/connector/HttpUtil.java b/opensrp-connector/src/main/java/org/opensrp/connector/HttpUtil.java
index d90d6cd123..39ebf5f2d1 100644
--- a/opensrp-connector/src/main/java/org/opensrp/connector/HttpUtil.java
+++ b/opensrp-connector/src/main/java/org/opensrp/connector/HttpUtil.java
@@ -12,6 +12,8 @@
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.io.IOUtils;
import org.opensrp.common.util.HttpResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
@@ -24,6 +26,8 @@
@Component
public class HttpUtil {
+ private static Logger logger = LoggerFactory.getLogger(HttpUtil.class.toString());
+
public HttpUtil() {
}
@@ -52,6 +56,7 @@ public static HttpResponse post(String url, String payload, String data, String
return new HttpResponse(con.getResponseCode() == HttpStatus.SC_OK, IOUtils.toString(con.getInputStream()));
} catch (Exception e) {
+ logger.error(HttpUtil.class.toString(), e);
throw new RuntimeException(e);
}
}
diff --git a/opensrp-web/src/main/java/org/opensrp/web/controller/FormSubmissionController.java b/opensrp-web/src/main/java/org/opensrp/web/controller/FormSubmissionController.java
index 5679d70618..2d09848caa 100644
--- a/opensrp-web/src/main/java/org/opensrp/web/controller/FormSubmissionController.java
+++ b/opensrp-web/src/main/java/org/opensrp/web/controller/FormSubmissionController.java
@@ -138,6 +138,7 @@ public FormSubmission convert(FormSubmissionDTO submission) {
addFormToOpenMRS(formSubmission);
}
catch(Exception e){
+ logger.error(this.getClass().getName(), e);
e.printStackTrace();
ErrorTrace errorTrace=new ErrorTrace(new Date(), "Parse Exception", "", e.getStackTrace().toString(), "Unsolved", formSubmission.formName());
errorTrace.setRecordId(formSubmission.instanceId());
diff --git a/pom.xml b/pom.xml
index 3bcce698ea..5be3d80e8a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,6 +100,14 @@
+
+
+ javax.mail
+ mail
+ 1.4
+
+
+