Skip to content

Commit

Permalink
pubsub: make logs quieter (#2492)
Browse files Browse the repository at this point in the history
Retryable stream closure happens quite often.
This commit lowers the log level to FINE to not spam the console.
  • Loading branch information
pongad committed Oct 9, 2017
1 parent ddcaaab commit 540734e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -229,11 +229,12 @@ public void onFailure(Throwable cause) {
logger.log(Level.FINE, "pull failure after service no longer running", cause);
return;
}
logger.log(Level.WARNING, "Terminated streaming with exception", cause);
if (!StatusUtil.isRetryable(cause)) {
logger.log(Level.SEVERE, "terminated streaming with exception", cause);
notifyFailed(cause);
return;
}
logger.log(Level.FINE, "stream closed with retryable exception; will reconnect", cause);
long backoffMillis = channelReconnectBackoffMillis.get();
long newBackoffMillis =
Math.min(backoffMillis * 2, MAX_CHANNEL_RECONNECT_BACKOFF.toMillis());
Expand Down

0 comments on commit 540734e

Please sign in to comment.