Skip to content

Commit 075f346

Browse files
committed
formatting logger and remove unused imports
Signed-off-by: salaboy <[email protected]>
1 parent abfd3ab commit 075f346

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414
import java.time.Duration;
1515
import java.time.Instant;
1616
import java.time.ZonedDateTime;
17-
import java.time.temporal.ChronoUnit;
18-
import java.time.temporal.TemporalField;
1917
import java.util.*;
2018
import java.util.concurrent.CancellationException;
2119
import java.util.concurrent.CompletableFuture;
22-
import java.util.concurrent.ConcurrentHashMap;
2320
import java.util.concurrent.ExecutionException;
2421
import java.util.function.Consumer;
2522
import java.util.function.Function;
@@ -659,7 +656,7 @@ private CompletableTask<Void> createInstantTimer(int id, Instant fireAt) {
659656
.build());
660657

661658
if (!this.isReplaying) {
662-
logger.finer("Creating Instant Timer with id: " + id + " fireAt: " + fireAt);
659+
logger.finer(() -> String.format("Creating Instant Timer with id: %s, fireAt: %s ", id, fireAt));
663660
}
664661

665662
CompletableTask<Void> timerTask = new CompletableTask<>();
@@ -700,8 +697,10 @@ public void handleTimerFired(HistoryEvent e) {
700697
}
701698

702699
if (!this.isReplaying) {
703-
// TODO: Log timer fired, including the scheduled fire-time
704-
this.logger.finer("Firing timer by completing task: "+timerEventId+" expected fire at time: "+ Instant.ofEpochSecond(timerFiredEvent.getFireAt().getSeconds(), timerFiredEvent.getFireAt().getNanos()));
700+
this.logger.finer(() ->
701+
String.format("Firing timer by completing task: %s expected fire at time: %s", timerEventId,
702+
Instant.ofEpochSecond(timerFiredEvent.getFireAt().getSeconds(),
703+
timerFiredEvent.getFireAt().getNanos())));
705704
}
706705

707706
CompletableTask<?> task = record.getTask();

0 commit comments

Comments
 (0)