@@ -439,29 +439,30 @@ public HistoryEntry getLastHistoryEntry(File file, boolean ui) throws HistoryExc
439
439
if (history != null ) {
440
440
HistoryEntry lastHistoryEntry = history .getLastHistoryEntry ();
441
441
if (lastHistoryEntry != null ) {
442
- LOGGER .log (Level .FINEST , "got latest history entry {0} for ''{1}'' from history cache" ,
443
- new Object []{lastHistoryEntry , file });
442
+ statistics .report (LOGGER , Level .FINEST ,
443
+ String .format ("got latest history entry %s for ''%s'' from history cache" ,
444
+ lastHistoryEntry , file ), "history.entry.latest" );
444
445
return lastHistoryEntry ;
445
446
}
446
447
}
447
448
} catch (CacheException e ) {
448
- LOGGER .log (Level .FINER , e .getMessage ());
449
+ LOGGER .log (Level .FINER ,
450
+ String .format ("failed to retrieve last history entry for ''%s'' in %s using history cache" ,
451
+ file , repository ),
452
+ e .getMessage ());
449
453
}
450
454
451
455
if (!isRepoHistoryEligible (repository , file , ui )) {
452
- LOGGER .log (Level .FINER , "cannot retrieve the last history entry for ''{0}'' in {1} because of settings" ,
453
- new Object []{file , repository });
456
+ statistics .report (LOGGER , Level .FINEST ,
457
+ String .format ("cannot retrieve the last history entry for ''%s'' in %s because of settings" ,
458
+ file , repository ), "history.entry.latest" );
454
459
return null ;
455
460
}
456
461
457
462
// Fallback to the repository method.
458
463
HistoryEntry lastHistoryEntry = repository .getLastHistoryEntry (file , ui );
459
- if (lastHistoryEntry != null ) {
460
- LOGGER .log (Level .FINEST , "got latest history entry {0} for ''{1}'' using repository {2}" ,
461
- new Object []{lastHistoryEntry , file , repository });
462
- }
463
464
statistics .report (LOGGER , Level .FINEST ,
464
- String .format ("finished retrieval of last history entry for '%s' (%s)" ,
465
+ String .format ("finished retrieval of last history entry for '%s' using repository method (%s)" ,
465
466
file , lastHistoryEntry != null ? "success" : "fail" ), "history.entry.latest" );
466
467
return lastHistoryEntry ;
467
468
}
0 commit comments