Skip to content

Commit

Permalink
fix: Updated log level from WARNING -> INFO for EOD failures (#1218)
Browse files Browse the repository at this point in the history
* fix: Updated log level from WARNING -> INFO for EOD failures

* formatting

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
mmicatka and gcf-owl-bot[bot] committed Aug 1, 2022
1 parent f2861a2 commit 8782533
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -58,13 +58,13 @@ implementation 'com.google.cloud:google-cloud-pubsub'
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-pubsub:1.120.5'
implementation 'com.google.cloud:google-cloud-pubsub:1.120.6'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.120.5"
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.120.6"
```

## Authentication
Expand Down
Expand Up @@ -547,18 +547,17 @@ public void onFailure(Throwable t) {
String errorMessage = metadataMap.get(ackId);
if (errorMessage.startsWith(TRANSIENT_FAILURE_METADATA_PREFIX)) {
// Retry all "TRANSIENT_*" error messages - do not set message future
logger.log(Level.WARNING, "Transient error message, will resend", errorMessage);
logger.log(Level.INFO, "Transient error message, will resend", errorMessage);
ackRequestDataArrayRetryList.add(ackRequestData);
} else if (errorMessage.equals(PERMANENT_FAILURE_INVALID_ACK_ID_METADATA)) {
// Permanent failure, send
logger.log(
Level.WARNING,
Level.INFO,
"Permanent error invalid ack id message, will not resend",
errorMessage);
ackRequestData.setResponse(AckResponse.INVALID, setResponseOnSuccess);
} else {
logger.log(
Level.WARNING, "Unknown error message, will not resend", errorMessage);
logger.log(Level.INFO, "Unknown error message, will not resend", errorMessage);
ackRequestData.setResponse(AckResponse.OTHER, setResponseOnSuccess);
}
} else {
Expand Down

0 comments on commit 8782533

Please sign in to comment.