diff --git a/pom.xml b/pom.xml
index 46817eb..fd5df5f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,18 @@
+
+
+
+ com.fasterxml.jackson
+ jackson-bom
+ 2.15.2
+ pom
+ import
+
+
+
+
@@ -66,7 +78,7 @@
net.logstash.logback
logstash-logback-encoder
- 4.11
+ 7.4
@@ -81,7 +93,7 @@
uk.co.flamingpenguin.jewelcli
jewelcli
- 0.6
+ 0.59
io.sentry
@@ -111,13 +123,6 @@
com.fasterxml.jackson.core
jackson-databind
- 2.12.7.1
- test
-
-
- com.google.guava
- guava
- 17.0
test
diff --git a/src/test/java/com/spotify/logging/LoggingConfiguratorTest.java b/src/test/java/com/spotify/logging/LoggingConfiguratorTest.java
index 3674f25..795c5b9 100644
--- a/src/test/java/com/spotify/logging/LoggingConfiguratorTest.java
+++ b/src/test/java/com/spotify/logging/LoggingConfiguratorTest.java
@@ -49,7 +49,6 @@
import ch.qos.logback.classic.net.SyslogAppender;
import ch.qos.logback.core.ConsoleAppender;
import ch.qos.logback.core.status.Status;
-import com.google.common.collect.FluentIterable;
import com.spotify.logging.logback.CustomLogstashEncoder;
import io.sentry.logback.SentryAppender;
import net.logstash.logback.composite.loggingevent.ArgumentsJsonProvider;
@@ -214,9 +213,9 @@ private void assertLogstashEncoder(final Level level) {
final CustomLogstashEncoder encoder = (CustomLogstashEncoder) stdout.getEncoder();
assertEquals(
1,
- FluentIterable.from(encoder.getProviders().getProviders())
- .filter(ArgumentsJsonProvider.class)
- .size());
+ encoder.getProviders().getProviders().stream()
+ .filter(ArgumentsJsonProvider.class::isInstance)
+ .count());
}
private void assertDefault(final String ident, final Level level) {
diff --git a/src/test/java/com/spotify/logging/logback/LogstashEncoderTest.java b/src/test/java/com/spotify/logging/logback/LogstashEncoderTest.java
index 83ac6cc..cbd9ddf 100644
--- a/src/test/java/com/spotify/logging/logback/LogstashEncoderTest.java
+++ b/src/test/java/com/spotify/logging/logback/LogstashEncoderTest.java
@@ -26,10 +26,11 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
import com.spotify.logging.LoggingConfigurator;
import com.spotify.logging.LoggingConfigurator.Level;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
import net.logstash.logback.encoder.LogstashEncoder;
import org.junit.Rule;
import org.junit.Test;
@@ -52,8 +53,8 @@ public void shouldIncludeStructuredArguments() throws JsonProcessingException {
"foo={} bar={} list={} map={} thing={}",
value("foo", 17),
value("bar", "quux"),
- value("list", ImmutableList.of(1, 2)),
- value("map", ImmutableMap.of("a", 3, "b", 4)),
+ value("list", Arrays.asList(1, 2)),
+ value("map", mapOf("a", 3, "b", 4)),
value("thing", new Thing(5, "6")));
final String log = systemOutRule.getLog();
final JsonNode parsedMessage = mapper.readTree(log);
@@ -67,6 +68,14 @@ public void shouldIncludeStructuredArguments() throws JsonProcessingException {
assertEquals(mapper.createObjectNode().put("v1", 5).put("v2", "6"), parsedMessage.get("thing"));
}
+ private Map mapOf(
+ final String keyA, final V valueA, final String keyB, final V valueB) {
+ final Map map = new HashMap<>();
+ map.put(keyA, valueA);
+ map.put(keyB, valueB);
+ return map;
+ }
+
public static class Thing {
private final int v1;