We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cda0b03 commit aee1e2eCopy full SHA for aee1e2e
1 file changed
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java
@@ -582,6 +582,8 @@ public void flush() {
582
583
/* Write logs synchronously or asynchronously based on writeSynchronicity setting. */
584
private void writeLogEntries(Iterable<LogEntry> logEntries, WriteOption... writeOptions) {
585
+ if (closed) return;
586
+
587
switch (this.writeSynchronicity) {
588
case SYNC:
589
get(writeAsync(logEntries, writeOptions));
@@ -688,6 +690,7 @@ public void close() throws Exception {
688
690
return;
689
691
}
692
closed = true;
693
+ flush();
694
rpc.close();
695
696
0 commit comments