diff --git a/openerp-atomfeed-service/pom.xml b/openerp-atomfeed-service/pom.xml
index 76a6054d..c094bbfe 100644
--- a/openerp-atomfeed-service/pom.xml
+++ b/openerp-atomfeed-service/pom.xml
@@ -161,22 +161,22 @@
jcl-over-slf4j
1.6.1
+
org.slf4j
- slf4j-log4j12
- 1.6.0
+ slf4j-api
+ 2.0.9
+
- org.apache.logging.log4j
- log4j-1.2-api
+ ch.qos.logback
+ logback-classic
+ 1.2.6
- org.apache.logging.log4j
- log4j-core
-
-
- org.apache.logging.log4j
- log4j-web
+ javax.annotation
+ javax.annotation-api
+ 1.3.2
javax.servlet
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/OpenERPAtomFeedProperties.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/OpenERPAtomFeedProperties.java
index 3bfe5995..4eccdb5e 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/OpenERPAtomFeedProperties.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/OpenERPAtomFeedProperties.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.job.Jobs;
import org.bahmni.openerp.web.OpenERPProperties;
import org.springframework.beans.factory.annotation.Value;
@@ -13,7 +13,7 @@
@Component
public class OpenERPAtomFeedProperties implements OpenERPProperties {
- private static Logger logger = LogManager.getLogger(OpenERPAtomFeedProperties.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenERPAtomFeedProperties.class);
@Value("${chunking.strategy}")
private String chunkingStrategy;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/AbstractWebClient.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/AbstractWebClient.java
index 82c6c3f4..df7a3f63 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/AbstractWebClient.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/AbstractWebClient.java
@@ -1,6 +1,6 @@
package org.bahmni.feed.openerp.client;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
import org.bahmni.feed.openerp.OpenERPAtomFeedProperties;
import org.bahmni.webclients.ClientCookies;
import org.bahmni.webclients.ConnectionDetails;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/FeedClientFactory.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/FeedClientFactory.java
index f7fbcfaa..06e3228d 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/FeedClientFactory.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/FeedClientFactory.java
@@ -1,8 +1,8 @@
package org.bahmni.feed.openerp.client;
import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.FeedException;
import org.bahmni.feed.openerp.OpenERPAtomFeedProperties;
import org.bahmni.feed.openerp.job.Jobs;
@@ -25,7 +25,7 @@ public class FeedClientFactory {
private final WorkerFactory workerFactory;
- private static final Logger logger = LogManager.getLogger(FeedClientFactory.class);
+ private static Logger logger = LoggerFactory.getLogger(FeedClientFactory.class);
public FeedClientFactory(WorkerFactory workerFactory) {
this.workerFactory = workerFactory;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/OpenElisWebClient.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/OpenElisWebClient.java
index 9aa35cc0..45a696d6 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/OpenElisWebClient.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/OpenElisWebClient.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.client;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.OpenERPAtomFeedProperties;
import org.bahmni.webclients.ConnectionDetails;
import org.bahmni.webclients.HttpClient;
@@ -9,7 +9,7 @@
public class OpenElisWebClient extends AbstractWebClient {
- private static Logger logger = LogManager.getLogger(OpenElisWebClient.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenElisWebClient.class);
public OpenElisWebClient(OpenERPAtomFeedProperties properties) {
connectionDetails = connectionDetails(properties);
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/OpenMRSWebClient.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/OpenMRSWebClient.java
index ab3e9147..a5231fd1 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/OpenMRSWebClient.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/OpenMRSWebClient.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.client;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.OpenERPAtomFeedProperties;
import org.bahmni.webclients.ConnectionDetails;
import org.bahmni.webclients.HttpClient;
@@ -9,7 +9,7 @@
public class OpenMRSWebClient extends AbstractWebClient {
- private static Logger logger = LogManager.getLogger(OpenMRSWebClient.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenMRSWebClient.class);
public OpenMRSWebClient(OpenERPAtomFeedProperties properties) {
connectionDetails = connectionDetails(properties);
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/ReferenceDataWebClient.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/ReferenceDataWebClient.java
index 78e570e5..f5c5a1f1 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/ReferenceDataWebClient.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/client/ReferenceDataWebClient.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.client;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.OpenERPAtomFeedProperties;
import org.bahmni.webclients.AnonymousAuthenticator;
import org.bahmni.webclients.ConnectionDetails;
@@ -9,7 +9,7 @@
public class ReferenceDataWebClient extends AbstractWebClient {
- private static Logger logger = LogManager.getLogger(OpenMRSWebClient.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenMRSWebClient.class);
public ReferenceDataWebClient(OpenERPAtomFeedProperties properties) {
connectionDetails = connectionDetails(properties);
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/controller/TaskMonitorController.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/controller/TaskMonitorController.java
new file mode 100644
index 00000000..e69de29b
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/domain/OpenMRSPersonAddress.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/domain/OpenMRSPersonAddress.java
index 6b49f543..c80a6633 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/domain/OpenMRSPersonAddress.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/domain/OpenMRSPersonAddress.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.domain;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.ObjectMapperRepository;
import org.bahmni.feed.openerp.worker.Jsonify;
import org.bahmni.feed.openerp.worker.OpenElisSaleOrderEventWorker;
@@ -93,7 +93,7 @@ public String toJsonString() {
try {
return ObjectMapperRepository.objectMapper.writeValueAsString(this) ;
} catch (IOException e) {
- Logger logger = LogManager.getLogger(OpenElisSaleOrderEventWorker.class);
+ Logger logger = LoggerFactory.getLogger(OpenElisSaleOrderEventWorker.class);
logger.error("Unable to convert personAddress hash to json string. {}", e.getMessage());
}
return null;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/domain/OpenMRSPersonAttributes.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/domain/OpenMRSPersonAttributes.java
index cf82f99d..68306fcc 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/domain/OpenMRSPersonAttributes.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/domain/OpenMRSPersonAttributes.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.domain;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.ObjectMapperRepository;
import org.bahmni.feed.openerp.worker.Jsonify;
import org.bahmni.feed.openerp.worker.OpenElisSaleOrderEventWorker;
@@ -54,7 +54,7 @@ public String toJsonString() {
}
}
catch (ClassCastException e){
- Logger logger = LogManager.getLogger(OpenElisSaleOrderEventWorker.class);
+ Logger logger = LoggerFactory.getLogger(OpenElisSaleOrderEventWorker.class);
logger.error("Unable to convert personAttributes {} to json string. {}", openMRSPersonAttribute.getValue().getClass(), e.getMessage());
}
@@ -65,7 +65,7 @@ public String toJsonString() {
try {
personAttributesJson = ObjectMapperRepository.objectMapper.writeValueAsString(personAttributes);
} catch (IOException e) {
- Logger logger = LogManager.getLogger(OpenElisSaleOrderEventWorker.class);
+ Logger logger = LoggerFactory.getLogger(OpenElisSaleOrderEventWorker.class);
logger.error("Unable to convert personAttributes hash to json string. {}", e.getMessage());
}
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/job/SimpleFeedJob.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/job/SimpleFeedJob.java
index 63e98f1a..b73eac52 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/job/SimpleFeedJob.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/job/SimpleFeedJob.java
@@ -1,14 +1,14 @@
package org.bahmni.feed.openerp.job;
import org.apache.commons.lang3.exception.ExceptionUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.FeedException;
import org.bahmni.feed.openerp.client.AtomFeedClientHelper;
import org.ict4h.atomfeed.client.service.AtomFeedClient;
public class SimpleFeedJob {
- private static Logger logger = LogManager.getLogger(SimpleFeedJob.class);
+ private static Logger logger = LoggerFactory.getLogger(SimpleFeedJob.class);
private AtomFeedClientHelper atomFeedClientHelper;
private AtomFeedClient atomFeedClient;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPCustomerServiceEventWorker.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPCustomerServiceEventWorker.java
index e5c45f76..dc745bd5 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPCustomerServiceEventWorker.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPCustomerServiceEventWorker.java
@@ -1,8 +1,8 @@
package org.bahmni.feed.openerp.worker;
import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.ObjectMapperRepository;
import org.bahmni.feed.openerp.OpenMRSPatientMapper;
import org.bahmni.feed.openerp.client.OpenMRSWebClient;
@@ -27,7 +27,7 @@ public class OpenERPCustomerServiceEventWorker implements EventWorker {
private OpenMRSWebClient webClient;
private String urlPrefix;
- private static Logger logger = LogManager.getLogger(OpenERPCustomerServiceEventWorker.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenERPCustomerServiceEventWorker.class);
public OpenERPCustomerServiceEventWorker(String feedUrl, OpenERPContext openERPContext, OpenMRSWebClient webClient, String urlPrefix) {
this.feedUrl = feedUrl;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPDrugServiceEventWorker.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPDrugServiceEventWorker.java
index 3ea2db41..cef6030a 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPDrugServiceEventWorker.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPDrugServiceEventWorker.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.worker;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.ObjectMapperRepository;
import org.bahmni.feed.openerp.domain.OpenMRSDrug;
import org.bahmni.feed.openerp.client.OpenMRSWebClient;
@@ -18,7 +18,7 @@
public class OpenERPDrugServiceEventWorker implements EventWorker {
- private static Logger logger = LogManager.getLogger(OpenERPDrugServiceEventWorker.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenERPDrugServiceEventWorker.class);
private OpenERPContext openERPContext;
private String feedUrl;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPLabOrderTypeServiceEventWorker.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPLabOrderTypeServiceEventWorker.java
index a53efa60..f4bf6aa2 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPLabOrderTypeServiceEventWorker.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPLabOrderTypeServiceEventWorker.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.worker;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.client.OpenMRSWebClient;
import org.bahmni.feed.openerp.domain.labOrderType.OpenMRSLabOrderTypeEvent;
import org.bahmni.feed.openerp.domain.labOrderType.OpenMRSLabPanelEvent;
@@ -19,7 +19,7 @@
public class OpenERPLabOrderTypeServiceEventWorker implements EventWorker {
- private static Logger logger = LogManager.getLogger(OpenERPLabOrderTypeServiceEventWorker.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenERPLabOrderTypeServiceEventWorker.class);
private OpenERPContext openERPContext;
private String feedUrl;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPSaleOrderEventWorker.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPSaleOrderEventWorker.java
index e00b5baa..ce19a1d4 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPSaleOrderEventWorker.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPSaleOrderEventWorker.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.worker;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.ObjectMapperRepository;
import org.bahmni.feed.openerp.client.OpenMRSWebClient;
import org.bahmni.feed.openerp.domain.encounter.MapERPOrders;
@@ -23,7 +23,7 @@ public class OpenERPSaleOrderEventWorker implements EventWorker {
private String urlPrefix;
- private static Logger logger = LogManager.getLogger(OpenERPSaleOrderEventWorker.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenERPSaleOrderEventWorker.class);
public OpenERPSaleOrderEventWorker(String feedUrl, OpenERPContext openERPContext, OpenMRSWebClient webClient, String urlPrefix) {
this.feedUrl = feedUrl;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPSaleableResourceWorker.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPSaleableResourceWorker.java
index 2f4fae19..8da939f6 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPSaleableResourceWorker.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenERPSaleableResourceWorker.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.worker;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.ObjectMapperRepository;
import org.bahmni.feed.openerp.client.OpenMRSWebClient;
import org.bahmni.feed.openerp.domain.OpenMRSResource;
@@ -26,7 +26,7 @@ public class OpenERPSaleableResourceWorker implements EventWorker {
private OpenMRSWebClient openMRSWebClient;
private String urlPrefix;
- private static Logger logger = LogManager.getLogger(OpenERPSaleableResourceWorker.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenERPSaleableResourceWorker.class);
public OpenERPSaleableResourceWorker(String feedUrl, OpenERPContext openERPContext, OpenMRSWebClient openMRSWebClient, String urlPrefix) {
this.openERPContext = openERPContext;
diff --git a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenElisSaleOrderEventWorker.java b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenElisSaleOrderEventWorker.java
index c11e924e..f1626b4b 100644
--- a/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenElisSaleOrderEventWorker.java
+++ b/openerp-atomfeed-service/src/main/java/org/bahmni/feed/openerp/worker/OpenElisSaleOrderEventWorker.java
@@ -1,7 +1,7 @@
package org.bahmni.feed.openerp.worker;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.bahmni.feed.openerp.ObjectMapperRepository;
import org.bahmni.feed.openerp.client.OpenElisWebClient;
import org.bahmni.feed.openerp.domain.openelis.OpenElisLabOrder;
@@ -20,7 +20,7 @@ public class OpenElisSaleOrderEventWorker implements EventWorker {
private final OpenElisWebClient webClient;
private final String urlPrefix;
- private static final Logger logger = LogManager.getLogger(OpenElisSaleOrderEventWorker.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenElisSaleOrderEventWorker.class);
public OpenElisSaleOrderEventWorker(String feedUrl, OpenERPContext openERPContext, OpenElisWebClient webClient, String urlPrefix) {
this.feedUrl = feedUrl;
diff --git a/openerp-atomfeed-service/src/main/resources/log4j2.properties b/openerp-atomfeed-service/src/main/resources/log4j2.properties
deleted file mode 100644
index af1d97b4..00000000
--- a/openerp-atomfeed-service/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-status = WARN
-
-name= properties_configuration
-property.basePath = ${sys:catalina.base}
-
-appender.rolling.type = RollingFile
-appender.rolling.name = file
-appender.rolling.fileName= ${basePath}/logs/openerp-feed-service.log
-appender.rolling.filePattern= ${basePath}/logs/openerp-feed-service-%d{MM-dd-yyyy}-%i.log
-appender.rolling.layout.type = PatternLayout
-appender.rolling.layout.pattern = %d %-5p [openerp-atomfeed-service][%c] %m%n
-appender.rolling.policies.type = Policies
-
-appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
-appender.rolling.policies.size.size = 5000KB
-appender.rolling.strategy.type = DefaultRolloverStrategy
-appender.rolling.strategy.max = 10
-
-appender.console.name = console
-appender.console.type = Console
-appender.console.target = SYSTEM_OUT
-appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d %-5p [openerp-atomfeed-service][%c] %m%n
-
-rootLogger.level = INFO
-rootLogger.appenderRef.rolling.ref = file
-rootLogger.appenderRef.console.ref = console
\ No newline at end of file
diff --git a/openerp-atomfeed-service/src/main/resources/logback.xml b/openerp-atomfeed-service/src/main/resources/logback.xml
new file mode 100644
index 00000000..9ab20339
--- /dev/null
+++ b/openerp-atomfeed-service/src/main/resources/logback.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ ${basePath}/logs/openerp-feed-service.log
+
+ ${basePath}/logs/openerp-feed-service-%d{MM-dd-yyyy}-%i.log
+ 5000KB
+ 10
+
+
+ %d %-5p [openerp-atomfeed-service][%c] %m%n
+
+
+
+
+ SYSTEM_OUT
+
+ %d %-5p [openerp-atomfeed-service][%c] %m%n
+
+
+
+
+
+
+
+
+
diff --git a/openerp-atomfeed-service/src/main/webapp/WEB-INF/web.xml b/openerp-atomfeed-service/src/main/webapp/WEB-INF/web.xml
index f643bd59..84d13984 100644
--- a/openerp-atomfeed-service/src/main/webapp/WEB-INF/web.xml
+++ b/openerp-atomfeed-service/src/main/webapp/WEB-INF/web.xml
@@ -3,9 +3,11 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
OpenERP Feed Service
+
- org.apache.logging.log4j.web.Log4jServletContextListener
+ ch.qos.logback.classic.servlet.LogbackServletContextListener
+
org.springframework.web.context.ContextLoaderListener
diff --git a/openerp-client/pom.xml b/openerp-client/pom.xml
index 5903255f..95f7278a 100644
--- a/openerp-client/pom.xml
+++ b/openerp-client/pom.xml
@@ -143,9 +143,17 @@
- org.apache.logging.log4j
- log4j-web
+ org.slf4j
+ slf4j-api
+ 2.0.9
+
+
+ ch.qos.logback
+ logback-classic
+ 1.2.6
+
+
javax.servlet
javax.servlet-api
diff --git a/openerp-client/src/main/java/org/bahmni/openerp/web/client/OpenERPResponseErrorValidator.java b/openerp-client/src/main/java/org/bahmni/openerp/web/client/OpenERPResponseErrorValidator.java
index 0d5e3d91..e700379e 100644
--- a/openerp-client/src/main/java/org/bahmni/openerp/web/client/OpenERPResponseErrorValidator.java
+++ b/openerp-client/src/main/java/org/bahmni/openerp/web/client/OpenERPResponseErrorValidator.java
@@ -1,7 +1,7 @@
package org.bahmni.openerp.web.client;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -18,7 +18,7 @@
import java.io.IOException;
public class OpenERPResponseErrorValidator {
- private static final Logger logger = LogManager.getLogger(OpenERPResponseErrorValidator.class);
+ private static Logger logger = LoggerFactory.getLogger(OpenERPResponseErrorValidator.class);
private static final DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
public void checkForError(String response) {
@@ -40,7 +40,7 @@ public void checkForError(String response) {
throw new RuntimeException(errorMessage.toString());
} catch (XPathExpressionException | SAXException | IOException e) {
logger.error("Error while parsing OpenERP response : {}", response);
- logger.error(e);
+ logger.error(String.valueOf(e));
throw new RuntimeException(e);
}
}
diff --git a/openerp-client/src/main/java/org/bahmni/openerp/web/http/client/HttpClient.java b/openerp-client/src/main/java/org/bahmni/openerp/web/http/client/HttpClient.java
index 7165ba29..94389c3c 100644
--- a/openerp-client/src/main/java/org/bahmni/openerp/web/http/client/HttpClient.java
+++ b/openerp-client/src/main/java/org/bahmni/openerp/web/http/client/HttpClient.java
@@ -1,7 +1,7 @@
package org.bahmni.openerp.web.http.client;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -13,7 +13,7 @@
@Component
public class HttpClient {
- private static final Logger logger = LogManager.getLogger(HttpClient.class);
+ private static Logger logger = LoggerFactory.getLogger(HttpClient.class);
private RestTemplate restTemplate;
private boolean isTimeoutSet;
diff --git a/openerp-client/src/main/java/org/bahmni/openerp/web/service/CustomerAccountService.java b/openerp-client/src/main/java/org/bahmni/openerp/web/service/CustomerAccountService.java
new file mode 100644
index 00000000..e69de29b
diff --git a/package/docker/Dockerfile b/package/docker/Dockerfile
index 9faef477..3ec72105 100644
--- a/package/docker/Dockerfile
+++ b/package/docker/Dockerfile
@@ -16,7 +16,7 @@ COPY openerp-atomfeed-service/target/openerp-atomfeed-service.war /etc/bahmni-er
RUN mkdir -p ${WAR_DIRECTORY}
RUN cd ${WAR_DIRECTORY} && jar xvf /etc/bahmni-erp-connect/openerp-atomfeed-service.war
-COPY package/resources/log4j2.properties ${WAR_DIRECTORY}/WEB-INF/classes/
+COPY package/resources/logback.xml ${WAR_DIRECTORY}/WEB-INF/classes/
COPY package/docker/templates/erp-atomfeed.properties.template /opt/bahmni-erp-connect/etc/erp-atomfeed.properties.template
COPY package/docker/scripts/run-liquibase.sh /opt/bahmni-erp-connect/etc/run-liquibase.sh
RUN chmod +x /opt/bahmni-erp-connect/etc/run-liquibase.sh
diff --git a/package/resources/logback.xml b/package/resources/logback.xml
new file mode 100644
index 00000000..9ab20339
--- /dev/null
+++ b/package/resources/logback.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+ ${basePath}/logs/openerp-feed-service.log
+
+ ${basePath}/logs/openerp-feed-service-%d{MM-dd-yyyy}-%i.log
+ 5000KB
+ 10
+
+
+ %d %-5p [openerp-atomfeed-service][%c] %m%n
+
+
+
+
+ SYSTEM_OUT
+
+ %d %-5p [openerp-atomfeed-service][%c] %m%n
+
+
+
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 7b8badc5..f287868b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,8 @@
4.4.5
4.5.13
3.0.1
- 2.17.1
+ 2.0.9
+ 1.2.6
0.94.3
false
@@ -184,14 +185,6 @@
commons-logging
commons-logging
-
- log4j
- log4j
-
-
- org.apache.logging.log4j
- log4j-core
-
@@ -230,25 +223,16 @@
+
- org.apache.logging.log4j
- log4j-1.2-api
- ${log4j.version}
-
-
- org.apache.logging.log4j
- log4j-core
- ${log4j.version}
-
-
- org.apache.logging.log4j
- log4j-web
- ${log4j.version}
+ org.slf4j
+ slf4j-api
+ 2.0.9
- org.apache.logging.log4j
- log4j-jcl
- ${log4j.version}
+ ch.qos.logback
+ logback-classic
+ 1.2.6
javax.servlet