@@ -236,7 +236,8 @@ public String getAnnotationCacheInfo() {
236
236
private Annotation getAnnotation (File file , @ Nullable String rev , boolean fallback ) throws IOException {
237
237
Repository repository = getRepository (file );
238
238
if (repository == null ) {
239
- LOGGER .log (Level .FINER , "no repository found for ''{0}'' to check for annotation" , file );
239
+ LOGGER .finer (() -> String .format ("no repository found for '%s' to check for annotation" ,
240
+ launderLog (file .toString ())));
240
241
return null ;
241
242
}
242
243
@@ -259,7 +260,7 @@ private Annotation getAnnotation(File file, @Nullable String rev, boolean fallba
259
260
}
260
261
261
262
if (!HistoryGuru .getInstance ().hasAnnotation (file )) {
262
- LOGGER .log ( Level . FINER , "skipped getting annotation for file ''{0}}'' " , file );
263
+ LOGGER .finer (() -> String . format ( "skipped getting annotation for file '%s' " , launderLog ( file . toString ())) );
263
264
return null ;
264
265
}
265
266
@@ -445,7 +446,8 @@ private HistoryEntry getLastHistoryEntryFromCache(File file, Repository reposito
445
446
@ Nullable
446
447
public HistoryEntry getLastHistoryEntry (File file , boolean ui , boolean fallback ) throws HistoryException {
447
448
Statistics statistics = new Statistics ();
448
- LOGGER .log (Level .FINEST , "started retrieval of last history entry for ''{0}''" , file );
449
+ LOGGER .finest (() -> String .format ("started retrieval of last history entry for '%s'" ,
450
+ launderLog (file .toString ())));
449
451
final File dir = file .isDirectory () ? file : file .getParentFile ();
450
452
final Repository repository = getRepository (dir );
451
453
final String meterName = "history.entry.latest" ;
@@ -707,7 +709,7 @@ public boolean hasHistoryCacheForFile(File file) {
707
709
*/
708
710
public boolean hasAnnotation (File file , @ Nullable Document document ) {
709
711
if (file .isDirectory ()) {
710
- LOGGER .log ( Level . FINEST , "no annotations for directories (''{0}'') " , file );
712
+ LOGGER .finest (() -> String . format ( "no annotations for directories: '%s' " , launderLog ( file . toString ())) );
711
713
return false ;
712
714
}
713
715
@@ -716,7 +718,8 @@ public boolean hasAnnotation(File file, @Nullable Document document) {
716
718
// however it does not hurt to check in case this will change.
717
719
String fileType = document .get (QueryBuilder .T );
718
720
if (fileType == null || !isXrefable (fileType )) {
719
- LOGGER .log (Level .FINEST , "no file type found in document for ''{0}'' or not xref-able" , file );
721
+ LOGGER .finest (() -> String .format ("no file type found in document for '%s' or not xref-able" ,
722
+ launderLog (file .toString ())));
720
723
return false ;
721
724
}
722
725
}
0 commit comments