@@ -236,7 +236,8 @@ public String getAnnotationCacheInfo() {
236236 private Annotation getAnnotation (File file , @ Nullable String rev , boolean fallback ) throws IOException {
237237 Repository repository = getRepository (file );
238238 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 ())));
240241 return null ;
241242 }
242243
@@ -259,7 +260,7 @@ private Annotation getAnnotation(File file, @Nullable String rev, boolean fallba
259260 }
260261
261262 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 ())) );
263264 return null ;
264265 }
265266
@@ -445,7 +446,8 @@ private HistoryEntry getLastHistoryEntryFromCache(File file, Repository reposito
445446 @ Nullable
446447 public HistoryEntry getLastHistoryEntry (File file , boolean ui , boolean fallback ) throws HistoryException {
447448 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 ())));
449451 final File dir = file .isDirectory () ? file : file .getParentFile ();
450452 final Repository repository = getRepository (dir );
451453 final String meterName = "history.entry.latest" ;
@@ -707,7 +709,7 @@ public boolean hasHistoryCacheForFile(File file) {
707709 */
708710 public boolean hasAnnotation (File file , @ Nullable Document document ) {
709711 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 ())) );
711713 return false ;
712714 }
713715
@@ -716,7 +718,8 @@ public boolean hasAnnotation(File file, @Nullable Document document) {
716718 // however it does not hurt to check in case this will change.
717719 String fileType = document .get (QueryBuilder .T );
718720 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 ())));
720723 return false ;
721724 }
722725 }
0 commit comments