diff --git a/atomfeed-client-spring/pom.xml b/atomfeed-client-spring/pom.xml index b8fb85c..d57670c 100644 --- a/atomfeed-client-spring/pom.xml +++ b/atomfeed-client-spring/pom.xml @@ -16,6 +16,7 @@ 3.1.0.RELEASE + 2.17.1 @@ -46,9 +47,15 @@ - log4j - log4j - 1.2.16 + org.apache.logging.log4j + log4j-api + ${log4jVersion} + provided + + + org.apache.logging.log4j + log4j-core + ${log4jVersion} provided diff --git a/atomfeed-client/pom.xml b/atomfeed-client/pom.xml index c3f373e..85e5a9b 100644 --- a/atomfeed-client/pom.xml +++ b/atomfeed-client/pom.xml @@ -17,6 +17,7 @@ root admin jdbc:h2:~/atomfeed;DATABASE_TO_UPPER=false + 2.17.1 @@ -26,9 +27,15 @@ 1.0 - log4j - log4j - 1.2.16 + org.apache.logging.log4j + log4j-api + ${log4jVersion} + provided + + + org.apache.logging.log4j + log4j-core + ${log4jVersion} provided diff --git a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/AtomFeedProperties.java b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/AtomFeedProperties.java index 7412113..f067233 100644 --- a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/AtomFeedProperties.java +++ b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/AtomFeedProperties.java @@ -1,6 +1,7 @@ package org.ict4h.atomfeed.client; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class AtomFeedProperties { private int readTimeout = 20000; @@ -10,7 +11,7 @@ public class AtomFeedProperties { private int failedEventMaxRetry = 5; private int failedEventsBatchProcessSize = 5; - private static Logger logger = Logger.getLogger(AtomFeedProperties.class); + private static Logger logger = LogManager.getLogger(AtomFeedProperties.class); private boolean handleRedirection = false; public int getReadTimeout() { diff --git a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/AllFeeds.java b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/AllFeeds.java index 2b440fa..be2c3a5 100644 --- a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/AllFeeds.java +++ b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/AllFeeds.java @@ -2,7 +2,8 @@ import com.sun.syndication.feed.atom.Feed; import com.sun.syndication.io.WireFeedInput; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.ict4h.atomfeed.client.exceptions.AtomFeedClientException; import org.ict4h.atomfeed.client.AtomFeedProperties; import org.ict4h.atomfeed.client.repository.datasource.DefaultHttpClient; @@ -17,7 +18,7 @@ public class AllFeeds { private AtomFeedProperties atomFeedProperties = new AtomFeedProperties(); private Map clientCookies; - private static Logger logger = Logger.getLogger(AllFeeds.class); + private static Logger logger = LogManager.getLogger(AllFeeds.class); protected AllFeeds() { this.httpClient = new DefaultHttpClient(); diff --git a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/jdbc/AllFailedEventsJdbcImpl.java b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/jdbc/AllFailedEventsJdbcImpl.java index 0180fb5..03c7996 100644 --- a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/jdbc/AllFailedEventsJdbcImpl.java +++ b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/jdbc/AllFailedEventsJdbcImpl.java @@ -2,7 +2,8 @@ import com.sun.syndication.feed.atom.Category; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.ict4h.atomfeed.Configuration; import org.ict4h.atomfeed.client.domain.Event; import org.ict4h.atomfeed.client.domain.FailedEvent; @@ -17,7 +18,7 @@ import java.util.List; public class AllFailedEventsJdbcImpl implements AllFailedEvents { - private static Logger logger = Logger.getLogger(AllFailedEventsJdbcImpl.class); + private static Logger logger = LogManager.getLogger(AllFailedEventsJdbcImpl.class); public static final String FAILED_EVENTS_TABLE = "failed_events"; public static final String FAILED_EVENT_RETRY_LOG_TABLE = "failed_event_retry_log"; public static final int ERROR_MSG_MAX_LEN = 4000; diff --git a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/jdbc/AllMarkersJdbcImpl.java b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/jdbc/AllMarkersJdbcImpl.java index ea8e751..feb0a31 100644 --- a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/jdbc/AllMarkersJdbcImpl.java +++ b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/repository/jdbc/AllMarkersJdbcImpl.java @@ -1,6 +1,7 @@ package org.ict4h.atomfeed.client.repository.jdbc; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.ict4h.atomfeed.Configuration; import org.ict4h.atomfeed.client.domain.Marker; import org.ict4h.atomfeed.client.exceptions.AtomFeedClientException; @@ -17,7 +18,7 @@ import java.util.List; public class AllMarkersJdbcImpl implements AllMarkers { - private static Logger logger = Logger.getLogger(AllMarkersJdbcImpl.class); + private static Logger logger = LogManager.getLogger(AllMarkersJdbcImpl.class); private JdbcConnectionProvider connectionProvider; public AllMarkersJdbcImpl(JdbcConnectionProvider connectionProvider) { diff --git a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/service/AtomFeedClient.java b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/service/AtomFeedClient.java index bc6bcbf..3ee36e6 100644 --- a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/service/AtomFeedClient.java +++ b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/service/AtomFeedClient.java @@ -2,7 +2,8 @@ import com.sun.syndication.feed.atom.Entry; import com.sun.syndication.feed.atom.Feed; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.ict4h.atomfeed.client.domain.Event; import org.ict4h.atomfeed.client.domain.FailedEvent; import org.ict4h.atomfeed.client.domain.FailedEventRetryLog; @@ -22,7 +23,7 @@ import java.util.List; public class AtomFeedClient implements FeedClient { - private static Logger logger = Logger.getLogger(AtomFeedClient.class); + private static Logger logger = LogManager.getLogger(AtomFeedClient.class); private AllFeeds allFeeds; private AtomFeedProperties atomFeedProperties; diff --git a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/service/FeedEnumerator.java b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/service/FeedEnumerator.java index ed6e3ca..766599f 100644 --- a/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/service/FeedEnumerator.java +++ b/atomfeed-client/src/main/java/org/ict4h/atomfeed/client/service/FeedEnumerator.java @@ -2,7 +2,6 @@ import com.sun.syndication.feed.atom.Entry; import com.sun.syndication.feed.atom.Feed; -import org.apache.log4j.Logger; import org.ict4h.atomfeed.client.domain.Marker; import org.ict4h.atomfeed.client.exceptions.AtomFeedClientException; import org.ict4h.atomfeed.client.repository.AllFeeds; @@ -19,8 +18,6 @@ public class FeedEnumerator implements Iterable, Iterator { private Feed currentFeed; private List entries; - private static Logger logger = Logger.getLogger(FeedEnumerator.class); - public FeedEnumerator(AllFeeds allFeeds, Marker marker) { this.allFeeds = allFeeds; this.marker = marker; diff --git a/atomfeed-client/src/test/resources/log4j.xml b/atomfeed-client/src/test/resources/log4j.xml index e188872..6c6010c 100644 --- a/atomfeed-client/src/test/resources/log4j.xml +++ b/atomfeed-client/src/test/resources/log4j.xml @@ -1,24 +1,19 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/atomfeed-commons/pom.xml b/atomfeed-commons/pom.xml index 0835244..daa4d46 100644 --- a/atomfeed-commons/pom.xml +++ b/atomfeed-commons/pom.xml @@ -11,6 +11,10 @@ atomfeed-commons 1.9.4 + + 2.17.1 + + javax.persistence @@ -30,9 +34,15 @@ test - log4j - log4j - 1.2.16 + org.apache.logging.log4j + log4j-api + ${log4jVersion} + provided + + + org.apache.logging.log4j + log4j-core + ${log4jVersion} provided diff --git a/atomfeed-server/pom.xml b/atomfeed-server/pom.xml index e9e7c86..b4f4939 100644 --- a/atomfeed-server/pom.xml +++ b/atomfeed-server/pom.xml @@ -13,6 +13,10 @@ 1.9.4 jar + + 2.17.1 + + @@ -133,9 +137,15 @@ 1.0 - log4j - log4j - 1.2.16 + org.apache.logging.log4j + log4j-api + ${log4jVersion} + provided + + + org.apache.logging.log4j + log4j-core + ${log4jVersion} provided diff --git a/atomfeed-server/src/main/java/org/ict4h/atomfeed/server/service/EventFeedServiceImpl.java b/atomfeed-server/src/main/java/org/ict4h/atomfeed/server/service/EventFeedServiceImpl.java index 549ced5..723d784 100644 --- a/atomfeed-server/src/main/java/org/ict4h/atomfeed/server/service/EventFeedServiceImpl.java +++ b/atomfeed-server/src/main/java/org/ict4h/atomfeed/server/service/EventFeedServiceImpl.java @@ -2,7 +2,6 @@ import com.sun.syndication.feed.atom.*; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; import org.ict4h.atomfeed.server.domain.EventFeed; import org.ict4h.atomfeed.server.domain.EventRecord; import org.ict4h.atomfeed.server.domain.EventRecordComparator; @@ -19,7 +18,6 @@ public class EventFeedServiceImpl implements EventFeedService { private static final String LINK_TYPE_SELF = "self"; private static final String LINK_TYPE_VIA = "via"; private static final String ATOMFEED_MEDIA_TYPE = "application/vnd.atomfeed+xml"; - private final Logger logger = Logger.getLogger(this.getClass()); private FeedGenerator feedGenerator; private ResourceBundle bundle; diff --git a/atomfeed-server/src/main/java/org/ict4h/atomfeed/server/service/helper/EventFeedServiceHelper.java b/atomfeed-server/src/main/java/org/ict4h/atomfeed/server/service/helper/EventFeedServiceHelper.java index 162fa90..50cb3a4 100644 --- a/atomfeed-server/src/main/java/org/ict4h/atomfeed/server/service/helper/EventFeedServiceHelper.java +++ b/atomfeed-server/src/main/java/org/ict4h/atomfeed/server/service/helper/EventFeedServiceHelper.java @@ -3,7 +3,7 @@ import com.sun.syndication.feed.atom.Feed; import com.sun.syndication.io.FeedException; import com.sun.syndication.io.WireFeedOutput; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.Logger; import org.ict4h.atomfeed.server.service.EventFeedService; import org.ict4h.atomfeed.transaction.AFTransactionManager; import org.ict4h.atomfeed.transaction.AFTransactionWork; diff --git a/atomfeed-spring-server/pom.xml b/atomfeed-spring-server/pom.xml index b3c4b86..f4f6ad9 100644 --- a/atomfeed-spring-server/pom.xml +++ b/atomfeed-spring-server/pom.xml @@ -17,6 +17,7 @@ 3.1.0.RELEASE + 2.17.1 @@ -47,9 +48,15 @@ - log4j - log4j - 1.2.16 + org.apache.logging.log4j + log4j-api + ${log4jVersion} + provided + + + org.apache.logging.log4j + log4j-core + ${log4jVersion} provided diff --git a/atomfeed-spring-server/src/main/java/org/ict4h/atomfeed/server/transaction/AtomFeedSpringTransactionSupport.java b/atomfeed-spring-server/src/main/java/org/ict4h/atomfeed/server/transaction/AtomFeedSpringTransactionSupport.java index f6cb129..f5f6b36 100644 --- a/atomfeed-spring-server/src/main/java/org/ict4h/atomfeed/server/transaction/AtomFeedSpringTransactionSupport.java +++ b/atomfeed-spring-server/src/main/java/org/ict4h/atomfeed/server/transaction/AtomFeedSpringTransactionSupport.java @@ -1,6 +1,5 @@ package org.ict4h.atomfeed.server.transaction; -import org.apache.log4j.Logger; import org.ict4h.atomfeed.jdbc.JdbcConnectionProvider; import org.ict4h.atomfeed.transaction.AFTransactionManager; import org.ict4h.atomfeed.transaction.AFTransactionWork; @@ -18,7 +17,6 @@ import java.util.Map; public class AtomFeedSpringTransactionSupport implements AFTransactionManager, JdbcConnectionProvider { - private static Logger logger = Logger.getLogger(AtomFeedSpringTransactionSupport.class); private final DataSource dataSource; private PlatformTransactionManager transactionManager; private Map propagationMap = new HashMap(); diff --git a/atomfeed-spring-server/src/main/java/org/ict4h/atomfeed/spring/resource/EventResource.java b/atomfeed-spring-server/src/main/java/org/ict4h/atomfeed/spring/resource/EventResource.java index 7d52b78..54e47f8 100644 --- a/atomfeed-spring-server/src/main/java/org/ict4h/atomfeed/spring/resource/EventResource.java +++ b/atomfeed-spring-server/src/main/java/org/ict4h/atomfeed/spring/resource/EventResource.java @@ -1,6 +1,7 @@ package org.ict4h.atomfeed.spring.resource; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.ict4h.atomfeed.server.service.EventFeedService; import org.ict4h.atomfeed.server.service.helper.EventFeedServiceHelper; import org.ict4h.atomfeed.server.transaction.AtomFeedSpringTransactionSupport; @@ -19,7 +20,7 @@ public class EventResource { private EventFeedService eventFeedService; private AtomFeedSpringTransactionSupport atomTxManager; - private static Logger logger = Logger.getLogger(EventResource.class); + private static Logger logger = LogManager.getLogger(EventResource.class); @Autowired public EventResource(EventFeedService eventFeedService, AtomFeedSpringTransactionSupport atomTxManager) { diff --git a/pom.xml b/pom.xml index b12b1ce..f5cb0e5 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ central - http://repo1.maven.org/maven2 + https://repo1.maven.org/maven2 Repository for dependencies true @@ -228,7 +228,7 @@ central - http://repo1.maven.org/maven2 + https://repo1.maven.org/maven2 Repository for plugins