|
30 | 30 | import java.util.concurrent.Future;
|
31 | 31 | import java.util.concurrent.atomic.AtomicInteger;
|
32 | 32 |
|
| 33 | +import com.palantir.logsafe.SafeArg; |
33 | 34 | import com.google.common.base.Predicate;
|
34 | 35 | import com.google.common.collect.HashMultimap;
|
35 | 36 | import com.google.common.collect.Iterables;
|
@@ -136,7 +137,9 @@ public static CommitLogReplayer construct(CommitLog commitLog)
|
136 | 137 | }
|
137 | 138 | if (globalPosition == null)
|
138 | 139 | globalPosition = ReplayPosition.firstNotCovered(cfPersisted.values());
|
139 |
| - logger.debug("Global replay position is {} from columnfamilies {}", globalPosition, FBUtilities.toString(cfPersisted)); |
| 140 | + logger.debug("Global replay position {} is from columnfamilies {}", |
| 141 | + SafeArg.of("globalPosition", globalPosition), |
| 142 | + SafeArg.of("columnFamilies", FBUtilities.toString(cfPersisted))); |
140 | 143 | return new CommitLogReplayer(commitLog, globalPosition, cfPersisted, replayFilter);
|
141 | 144 | }
|
142 | 145 |
|
@@ -399,8 +402,10 @@ public void recover(File file, boolean tolerateTruncation) throws IOException
|
399 | 402 | {
|
400 | 403 | int replayPos = replayEnd + CommitLogSegment.SYNC_MARKER_SIZE;
|
401 | 404 |
|
402 |
| - if (logger.isTraceEnabled()) |
403 |
| - logger.trace("Replaying {} between {} and {}", file, reader.getFilePointer(), end); |
| 405 | + logger.debug("Replaying {} between {} and {}", |
| 406 | + SafeArg.of("file", file.getName()), |
| 407 | + SafeArg.of("start", reader.getFilePointer()), |
| 408 | + SafeArg.of("end", end)); |
404 | 409 | if (compressor != null)
|
405 | 410 | {
|
406 | 411 | int uncompressedLength = reader.readInt();
|
@@ -473,7 +478,7 @@ public boolean logAndCheckIfShouldSkip(File file, CommitLogDescriptor desc)
|
473 | 478 |
|
474 | 479 | if (globalPosition.segment > desc.id)
|
475 | 480 | {
|
476 |
| - logger.trace("skipping replay of fully-flushed {}", file); |
| 481 | + logger.debug("Skipping replay of fully-flushed {}", SafeArg.of("file", file.getName())); |
477 | 482 | return true;
|
478 | 483 | }
|
479 | 484 | return false;
|
|
0 commit comments