Skip to content

Commit f0e839b

Browse files
Log only if policy or handler is present
Signed-off-by: Mason <[email protected]>
1 parent 9296158 commit f0e839b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

client/src/main/java/io/dapr/durabletask/TaskOrchestrationExecutor.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,8 +1183,13 @@ private boolean shouldRetry() {
11831183
boolean shouldRetryBasedOnPolicy = this.policy == null || this.shouldRetryBasedOnPolicy();
11841184
boolean shouldRetryBasedOnHandler = this.handler == null || this.handler.handle(retryContext);
11851185

1186-
logger.info(() -> String.format("Retry policy provided: %s, shouldRetryBasedOnPolicy: %s", this.policy != null, shouldRetryBasedOnPolicy));
1187-
logger.info(() -> String.format("Retry handler provided: %s, shouldRetryBasedOnHandler: %s", this.handler != null, shouldRetryBasedOnHandler));
1186+
if (this.policy != null) {
1187+
logger.info(() -> String.format("shouldRetryBasedOnPolicy: %s", shouldRetryBasedOnPolicy));
1188+
}
1189+
1190+
if (this.handler != null) {
1191+
logger.info(() -> String.format("shouldRetryBasedOnHandler: %s", shouldRetryBasedOnHandler));
1192+
}
11881193

11891194
return shouldRetryBasedOnPolicy && shouldRetryBasedOnHandler;
11901195
}

0 commit comments

Comments
 (0)