Skip to content

Commit 3dc147c

Browse files
authored
Disable SerializationFeature.FAIL_ON_EMPTY_BEANS in dataMapper (#22)
1 parent f73e2b5 commit 3dc147c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/logtail/logback/LogtailAppender.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.fasterxml.jackson.databind.Module;
1010
import com.fasterxml.jackson.databind.ObjectMapper;
1111
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
12+
import com.fasterxml.jackson.databind.SerializationFeature;
1213
import org.slf4j.Logger;
1314
import org.slf4j.LoggerFactory;
1415

@@ -75,7 +76,8 @@ public LogtailAppender() {
7576

7677
dataMapper = new ObjectMapper()
7778
.setSerializationInclusion(JsonInclude.Include.NON_NULL)
78-
.setPropertyNamingStrategy(PropertyNamingStrategies.UPPER_CAMEL_CASE);
79+
.setPropertyNamingStrategy(PropertyNamingStrategies.UPPER_CAMEL_CASE)
80+
.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
7981

8082
scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(threadFactory);
8183
scheduledFuture = scheduledExecutorService.scheduleWithFixedDelay(new LogtailSender(), batchInterval, batchInterval, TimeUnit.MILLISECONDS);

0 commit comments

Comments
 (0)