From 1adf86722361ce946c733de87cb217fa2f65bfd5 Mon Sep 17 00:00:00 2001 From: losalex <90795544+losalex@users.noreply.github.com> Date: Thu, 31 Mar 2022 10:03:53 -0700 Subject: [PATCH] fix: Async logging should not rethrow error in onFailure callback (#923) --- .../src/main/java/com/google/cloud/logging/LoggingImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java index 4404ea675..eac372e62 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java @@ -882,7 +882,7 @@ public void flush() { try { ApiFutures.allAsList(writesToFlush).get(FLUSH_WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException | TimeoutException e) { - throw new RuntimeException(e); + System.err.println("ERROR: flush failure: " + e); } }