diff --git a/pom.xml b/pom.xml
index b6410e6887..5ce0edb136 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-mongodb-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-3881-SNAPSHOT
pom
Spring Data MongoDB
diff --git a/spring-data-mongodb-benchmarks/pom.xml b/spring-data-mongodb-benchmarks/pom.xml
index e2704a6753..8d0339fc94 100644
--- a/spring-data-mongodb-benchmarks/pom.xml
+++ b/spring-data-mongodb-benchmarks/pom.xml
@@ -7,7 +7,7 @@
org.springframework.data
spring-data-mongodb-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-3881-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb-distribution/pom.xml b/spring-data-mongodb-distribution/pom.xml
index b75f8bf624..beb11e8e85 100644
--- a/spring-data-mongodb-distribution/pom.xml
+++ b/spring-data-mongodb-distribution/pom.xml
@@ -14,7 +14,7 @@
org.springframework.data
spring-data-mongodb-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-3881-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml
index e3d753e766..4bad32590c 100644
--- a/spring-data-mongodb/pom.xml
+++ b/spring-data-mongodb/pom.xml
@@ -11,7 +11,7 @@
org.springframework.data
spring-data-mongodb-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-3881-SNAPSHOT
../pom.xml
@@ -237,13 +237,6 @@
true
-
- org.slf4j
- jul-to-slf4j
- ${slf4j}
- test
-
-
nl.jqno.equalsverifier
equalsverifier
diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SpringDataMongoDB.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SpringDataMongoDB.java
index 808b576bcb..c136ade3f5 100644
--- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SpringDataMongoDB.java
+++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SpringDataMongoDB.java
@@ -15,8 +15,8 @@
*/
package org.springframework.data.mongodb;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.data.util.Version;
import org.springframework.util.StringUtils;
@@ -31,7 +31,7 @@
*/
public class SpringDataMongoDB {
- private static final Logger LOGGER = LoggerFactory.getLogger(SpringDataMongoDB.class);
+ private static final Log LOGGER = LogFactory.getLog(SpringDataMongoDB.class);
private static final Version FALLBACK_VERSION = new Version(3);
private static final MongoDriverInformation DRIVER_INFORMATION = MongoDriverInformation
@@ -68,7 +68,7 @@ public static Version version() {
try {
return Version.parse(versionString);
} catch (Exception e) {
- LOGGER.debug("Cannot read Spring Data MongoDB version '{}'.", versionString);
+ LOGGER.debug(String.format("Cannot read Spring Data MongoDB version '%s'.", versionString));
}
return FALLBACK_VERSION;
diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/ServerAddressPropertyEditor.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/ServerAddressPropertyEditor.java
index 5e5d82f6be..34b59e7809 100644
--- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/ServerAddressPropertyEditor.java
+++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/ServerAddressPropertyEditor.java
@@ -21,8 +21,8 @@
import java.util.HashSet;
import java.util.Set;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
@@ -43,8 +43,8 @@ public class ServerAddressPropertyEditor extends PropertyEditorSupport {
* A port is a number without a leading 0 at the end of the address that is proceeded by just a single :.
*/
private static final String HOST_PORT_SPLIT_PATTERN = "(? 2) {
- LOG.warn(COULD_NOT_PARSE_ADDRESS_MESSAGE, "source", source);
+ LOG.warn(String.format(COULD_NOT_PARSE_ADDRESS_MESSAGE, "source", source));
return null;
}
@@ -105,9 +105,9 @@ private ServerAddress parseServerAddress(String source) {
return port == null ? new ServerAddress(hostAddress) : new ServerAddress(hostAddress, port);
} catch (UnknownHostException e) {
- LOG.warn(COULD_NOT_PARSE_ADDRESS_MESSAGE, "host", hostAndPort[0]);
+ LOG.warn(String.format(COULD_NOT_PARSE_ADDRESS_MESSAGE, "host", hostAndPort[0]));
} catch (NumberFormatException e) {
- LOG.warn(COULD_NOT_PARSE_ADDRESS_MESSAGE, "port", hostAndPort[1]);
+ LOG.warn(String.format(COULD_NOT_PARSE_ADDRESS_MESSAGE, "port", hostAndPort[1]));
}
return null;
diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java
index 93477b738e..895097dd47 100644
--- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java
+++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java
@@ -24,10 +24,10 @@
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.bson.Document;
import org.bson.conversions.Bson;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
@@ -163,7 +163,7 @@
*/
public class MongoTemplate implements MongoOperations, ApplicationContextAware, IndexOperationsProvider {
- private static final Logger LOGGER = LoggerFactory.getLogger(MongoTemplate.class);
+ private static final Log LOGGER = LogFactory.getLog(MongoTemplate.class);
private static final WriteResultChecking DEFAULT_WRITE_RESULT_CHECKING = WriteResultChecking.NONE;
private final MongoConverter mongoConverter;
@@ -507,8 +507,8 @@ protected void executeQuery(Query query, String collectionName, DocumentCallback
Document fieldsObject = query.getFieldsObject();
if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Executing query: {} sort: {} fields: {} in collection: {}", serializeToJsonSafely(queryObject),
- sortObject, fieldsObject, collectionName);
+ LOGGER.debug(String.format("Executing query: %s sort: %s fields: %s in collection: %s",
+ serializeToJsonSafely(queryObject), sortObject, fieldsObject, collectionName));
}
this.executeQueryInternal(new FindCallback(queryObject, fieldsObject, null),
@@ -700,8 +700,8 @@ public void dropCollection(String collectionName) {
execute(collectionName, (CollectionCallback) collection -> {
collection.drop();
if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Dropped collection [{}]",
- collection.getNamespace() != null ? collection.getNamespace().getCollectionName() : collectionName);
+ LOGGER.debug(String.format("Dropped collection [%s]",
+ collection.getNamespace() != null ? collection.getNamespace().getCollectionName() : collectionName));
}
return null;
});
@@ -903,8 +903,8 @@ public List findDistinct(Query query, String field, String collectionName
MongoIterable> result = execute(collectionName, (collection) -> {
if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Executing findDistinct using query {} for field: {} in collection: {}",
- serializeToJsonSafely(mappedQuery), field, collectionName);
+ LOGGER.debug(String.format("Executing findDistinct using query %s for field: %s in collection: %s",
+ serializeToJsonSafely(mappedQuery), field, collectionName));
}
QueryCursorPreparer preparer = new QueryCursorPreparer(query, entityClass);
@@ -1126,7 +1126,8 @@ public long count(Query query, @Nullable Class> entityClass, String collection
protected long doCount(String collectionName, Document filter, CountOptions options) {
if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Executing count: {} in collection: {}", serializeToJsonSafely(filter), collectionName);
+ LOGGER
+ .debug(String.format("Executing count: %s in collection: %s", serializeToJsonSafely(filter), collectionName));
}
return execute(collectionName,
@@ -1453,7 +1454,8 @@ protected T doSave(String collectionName, T objectToSave, MongoWriter wri
protected Object insertDocument(String collectionName, Document document, Class> entityClass) {
if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Inserting Document containing fields: {} in collection: {}", document.keySet(), collectionName);
+ LOGGER.debug(String.format("Inserting Document containing fields: %s in collection: %s", document.keySet(),
+ collectionName));
}
return execute(collectionName, collection -> {
@@ -1478,7 +1480,7 @@ protected List