diff --git a/pom.xml b/pom.xml index fd9a46d9a..824fb8f43 100644 --- a/pom.xml +++ b/pom.xml @@ -155,6 +155,7 @@ org.threeten threetenbp + test diff --git a/src/main/java/com/google/cloud/logging/logback/LogbackBatchingSettings.java b/src/main/java/com/google/cloud/logging/logback/LogbackBatchingSettings.java index 48e8b7b9a..c7f0f1c72 100644 --- a/src/main/java/com/google/cloud/logging/logback/LogbackBatchingSettings.java +++ b/src/main/java/com/google/cloud/logging/logback/LogbackBatchingSettings.java @@ -19,7 +19,7 @@ import com.google.api.gax.batching.BatchingSettings; import com.google.api.gax.batching.FlowControlSettings; import com.google.api.gax.batching.FlowController.LimitExceededBehavior; -import org.threeten.bp.Duration; +import java.time.Duration; /** * This class is used only to provide batch settings configuration in logback.xml since {@link @@ -69,7 +69,7 @@ public BatchingSettings build() { settings.setRequestByteThreshold(requestByteThreshold); } if (delayThreshold != null) { - settings.setDelayThreshold(Duration.ofMillis(delayThreshold)); + settings.setDelayThresholdDuration(Duration.ofMillis(delayThreshold)); } if (maxOutstandingElementCount != null || maxOutstandingRequestBytes != null