Skip to content

Commit 540734e

Browse files
authored
pubsub: make logs quieter (#2492)
Retryable stream closure happens quite often. This commit lowers the log level to FINE to not spam the console.
1 parent ddcaaab commit 540734e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,12 @@ public void onFailure(Throwable cause) {
229229
logger.log(Level.FINE, "pull failure after service no longer running", cause);
230230
return;
231231
}
232-
logger.log(Level.WARNING, "Terminated streaming with exception", cause);
233232
if (!StatusUtil.isRetryable(cause)) {
233+
logger.log(Level.SEVERE, "terminated streaming with exception", cause);
234234
notifyFailed(cause);
235235
return;
236236
}
237+
logger.log(Level.FINE, "stream closed with retryable exception; will reconnect", cause);
237238
long backoffMillis = channelReconnectBackoffMillis.get();
238239
long newBackoffMillis =
239240
Math.min(backoffMillis * 2, MAX_CHANNEL_RECONNECT_BACKOFF.toMillis());

0 commit comments

Comments
 (0)