Skip to content

Migrate off Slf4J to JCL. #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-relational-parent</artifactId>
<version>2.4.0-SNAPSHOT</version>
<version>2.4.0-1091-slf4j-to-jcl-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Spring Data Relational Parent</name>
Expand Down
2 changes: 1 addition & 1 deletion spring-data-jdbc-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-relational-parent</artifactId>
<version>2.4.0-SNAPSHOT</version>
<version>2.4.0-1091-slf4j-to-jcl-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions spring-data-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>spring-data-jdbc</artifactId>
<version>2.4.0-SNAPSHOT</version>
<version>2.4.0-1091-slf4j-to-jcl-SNAPSHOT</version>

<name>Spring Data JDBC</name>
<description>Spring Data module for JDBC repositories.</description>
Expand All @@ -15,7 +15,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-relational-parent</artifactId>
<version>2.4.0-SNAPSHOT</version>
<version>2.4.0-1091-slf4j-to-jcl-SNAPSHOT</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import java.util.Map;
import java.util.Optional;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
Expand Down Expand Up @@ -71,7 +71,7 @@
*/
public class BasicJdbcConverter extends BasicRelationalConverter implements JdbcConverter, ApplicationContextAware {

private static final Logger LOG = LoggerFactory.getLogger(BasicJdbcConverter.class);
private static final Log LOG = LogFactory.getLog(BasicJdbcConverter.class);
private static final Converter<Iterable<?>, Map<?, ?>> ITERABLE_OF_ENTRY_TO_MAP_CONVERTER = new IterableOfEntryToMapConverter();

private final JdbcTypeFactory typeFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.sql.SQLException;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.data.mapping.MappingException;
import org.springframework.jdbc.support.JdbcUtils;
import org.springframework.lang.Nullable;
Expand All @@ -38,7 +38,7 @@
*/
class ResultSetAccessor {

private static final Logger LOG = LoggerFactory.getLogger(ResultSetAccessor.class);
private static final Log LOG = LogFactory.getLog(ResultSetAccessor.class);

private final ResultSet resultSet;

Expand All @@ -64,7 +64,7 @@ private static Map<String, Integer> indexColumns(ResultSet resultSet) {
String label = metaData.getColumnLabel(i);

if (index.containsKey(label)) {
LOG.warn("ResultSet contains {} multiple times", label);
LOG.warn(String.format("ResultSet contains %s multiple times", label));
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.SqlSessionTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
Expand Down Expand Up @@ -66,7 +66,7 @@
*/
public class MyBatisDataAccessStrategy implements DataAccessStrategy {

private static final Logger LOG = LoggerFactory.getLogger(MyBatisDataAccessStrategy.class);
private static final Log LOG = LogFactory.getLog(MyBatisDataAccessStrategy.class);
private static final String VERSION_SQL_PARAMETER_NAME_OLD = "___oldOptimisticLockingVersion";

private final SqlSession sqlSession;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.util.List;
import java.util.Optional;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
Expand Down Expand Up @@ -66,7 +66,7 @@
@Configuration(proxyBeanMethods = false)
public class AbstractJdbcConfiguration implements ApplicationContextAware {

private static final Logger LOG = LoggerFactory.getLogger(AbstractJdbcConfiguration.class);
private static final Log LOG = LogFactory.getLog(AbstractJdbcConfiguration.class);

private ApplicationContext applicationContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import javax.sql.DataSource;

import org.awaitility.Awaitility;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
Expand All @@ -45,7 +45,7 @@
@Configuration
abstract class DataSourceConfiguration {

private static final Logger LOG = LoggerFactory.getLogger(DataSourceConfiguration.class);
private static final Log LOG = LogFactory.getLog(DataSourceConfiguration.class);

@Autowired Class<?> testClass;
@Autowired Environment environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import javax.sql.DataSource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.jdbc.core.JdbcTemplate;
Expand All @@ -40,7 +40,7 @@
@Profile("oracle")
public class OracleDataSourceConfiguration extends DataSourceConfiguration {

private static final Logger LOG = LoggerFactory.getLogger(OracleDataSourceConfiguration.class);
private static final Log LOG = LogFactory.getLog(OracleDataSourceConfiguration.class);

private static OracleContainer ORACLE_CONTAINER;

Expand Down
4 changes: 2 additions & 2 deletions spring-data-relational/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>spring-data-relational</artifactId>
<version>2.4.0-SNAPSHOT</version>
<version>2.4.0-1091-slf4j-to-jcl-SNAPSHOT</version>

<name>Spring Data Relational</name>
<description>Spring Data Relational support</description>

<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-relational-parent</artifactId>
<version>2.4.0-SNAPSHOT</version>
<version>2.4.0-1091-slf4j-to-jcl-SNAPSHOT</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.data.relational.core.mapping.event;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.core.GenericTypeResolver;

Expand All @@ -29,7 +29,7 @@
*/
public class AbstractRelationalEventListener<E> implements ApplicationListener<AbstractRelationalEvent<?>> {

private static final Logger LOG = LoggerFactory.getLogger(AbstractRelationalEventListener.class);
private static final Log LOG = LogFactory.getLog(AbstractRelationalEventListener.class);

private final Class<?> domainClass;

Expand Down Expand Up @@ -80,7 +80,7 @@ public void onApplicationEvent(AbstractRelationalEvent<?> event) {
protected void onBeforeConvert(BeforeConvertEvent<E> event) {

if (LOG.isDebugEnabled()) {
LOG.debug("onBeforeConvert({})", event.getEntity());
LOG.debug(String.format("onBeforeConvert(%s)", event.getEntity()));
}
}

Expand All @@ -92,7 +92,7 @@ protected void onBeforeConvert(BeforeConvertEvent<E> event) {
protected void onBeforeSave(BeforeSaveEvent<E> event) {

if (LOG.isDebugEnabled()) {
LOG.debug("onBeforeSave({})", event.getAggregateChange());
LOG.debug(String.format("onBeforeSave(%s)", event.getAggregateChange()));
}
}

Expand All @@ -104,7 +104,7 @@ protected void onBeforeSave(BeforeSaveEvent<E> event) {
protected void onAfterSave(AfterSaveEvent<E> event) {

if (LOG.isDebugEnabled()) {
LOG.debug("onAfterSave({})", event.getAggregateChange());
LOG.debug(String.format("onAfterSave(%s)", event.getAggregateChange()));
}
}

Expand All @@ -118,7 +118,7 @@ protected void onAfterSave(AfterSaveEvent<E> event) {
protected void onAfterLoad(AfterLoadEvent<E> event) {

if (LOG.isDebugEnabled()) {
LOG.debug("onAfterLoad({})", event.getEntity());
LOG.debug(String.format("onAfterLoad(%s)", event.getEntity()));
}
}

Expand All @@ -131,7 +131,7 @@ protected void onAfterLoad(AfterLoadEvent<E> event) {
protected void onAfterConvert(AfterConvertEvent<E> event) {

if (LOG.isDebugEnabled()) {
LOG.debug("onAfterConvert({})", event.getEntity());
LOG.debug(String.format("onAfterConvert(%s)", event.getEntity()));
}
}

Expand All @@ -143,7 +143,7 @@ protected void onAfterConvert(AfterConvertEvent<E> event) {
protected void onAfterDelete(AfterDeleteEvent<E> event) {

if (LOG.isDebugEnabled()) {
LOG.debug("onAfterDelete({})", event.getAggregateChange());
LOG.debug(String.format("onAfterDelete(%s)", event.getAggregateChange()));
}
}

Expand All @@ -155,7 +155,7 @@ protected void onAfterDelete(AfterDeleteEvent<E> event) {
protected void onBeforeDelete(BeforeDeleteEvent<E> event) {

if (LOG.isDebugEnabled()) {
LOG.debug("onBeforeDelete({})", event.getAggregateChange());
LOG.debug(String.format("onBeforeDelete(%s)", event.getAggregateChange()));
}
}

Expand Down