Skip to content

Commit

Permalink
Disable SerializationFeature.FAIL_ON_EMPTY_BEANS in dataMapper (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrHeinz authored Apr 4, 2024
1 parent f73e2b5 commit 3dc147c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/logtail/logback/LogtailAppender.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -75,7 +76,8 @@ public LogtailAppender() {

dataMapper = new ObjectMapper()
.setSerializationInclusion(JsonInclude.Include.NON_NULL)
.setPropertyNamingStrategy(PropertyNamingStrategies.UPPER_CAMEL_CASE);
.setPropertyNamingStrategy(PropertyNamingStrategies.UPPER_CAMEL_CASE)
.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);

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

0 comments on commit 3dc147c

Please sign in to comment.