|
14 | 14 | import java.time.Duration; |
15 | 15 | import java.time.Instant; |
16 | 16 | import java.time.ZonedDateTime; |
17 | | -import java.time.temporal.ChronoUnit; |
18 | | -import java.time.temporal.TemporalField; |
19 | 17 | import java.util.*; |
20 | 18 | import java.util.concurrent.CancellationException; |
21 | 19 | import java.util.concurrent.CompletableFuture; |
22 | | -import java.util.concurrent.ConcurrentHashMap; |
23 | 20 | import java.util.concurrent.ExecutionException; |
24 | 21 | import java.util.function.Consumer; |
25 | 22 | import java.util.function.Function; |
@@ -659,7 +656,7 @@ private CompletableTask<Void> createInstantTimer(int id, Instant fireAt) { |
659 | 656 | .build()); |
660 | 657 |
|
661 | 658 | 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)); |
663 | 660 | } |
664 | 661 |
|
665 | 662 | CompletableTask<Void> timerTask = new CompletableTask<>(); |
@@ -700,8 +697,10 @@ public void handleTimerFired(HistoryEvent e) { |
700 | 697 | } |
701 | 698 |
|
702 | 699 | 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()))); |
705 | 704 | } |
706 | 705 |
|
707 | 706 | CompletableTask<?> task = record.getTask(); |
|
0 commit comments