Skip to content

Commit a0586ef

Browse files
Refine warning log when encountering failure and retrying.
1 parent 434a4f9 commit a0586ef

File tree

1 file changed

+2
-2
lines changed
  • cf-ops-automation-broker-core/src/main/java/com/orange/oss/cloudfoundry/broker/opsautomation/ondemandbroker/git

1 file changed

+2
-2
lines changed

cf-ops-automation-broker-core/src/main/java/com/orange/oss/cloudfoundry/broker/opsautomation/ondemandbroker/git/RetrierGitManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public RetrierGitManager(String repositoryAliasName, GitManager gitManager, Retr
1717
this.gitManager = gitManager;
1818
this.retryPolicy = retryPolicy;
1919
this.retryPolicy
20-
.onRetry(e -> logger.warn("Failure, retrying. Cause: " + e.getLastFailure()))
21-
.onRetriesExceeded(e -> logger.warn("Aborting. Max retries exceeded:" + this.retryPolicy.getMaxAttempts() + " Rethrowing:" + e.getFailure()))
20+
.onRetry(e -> logger.warn("Transient (?) failure, retrying. Cause: {}", e.getLastFailure()))
21+
.onRetriesExceeded(e -> logger.warn("Aborting. Max attempts reached: #" + this.retryPolicy.getMaxAttempts() + " Rethrowing failure:" + e.getFailure()))
2222
.handleIf(e -> isCauseSubclassOf(e, org.eclipse.jgit.api.errors.TransportException.class))
2323
;
2424
logger.debug("Configured for {} with retry policy {}", repositoryAliasName, ToStringBuilder.reflectionToString(retryPolicy));

0 commit comments

Comments
 (0)