Skip to content

Commit

Permalink
quote directort paths in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
vladak committed Mar 28, 2024
1 parent 5d55b5f commit a95ea5e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private void initFields() throws IOException {
Set<String> copy = new HashSet<>(allowedFields);
copy.removeAll(indexedFields);
logger.log(Level.WARNING,
"Fields {0} will be ignored because they were not found in index directory {1}",
"Fields {0} will be ignored because they were not found in index directory ''{1}''",
new Object[] {copy, indexDir});

copy = new HashSet<>(allowedFields);
Expand Down Expand Up @@ -201,7 +201,7 @@ private void loadStoredWFSTs() throws IOException {
var wfst = loadStoredWFST(wfstFile);
lookups.put(field, wfst);
} else {
logger.log(Level.INFO, "Missing WFST file for {0} field in {1}, creating a new one",
logger.log(Level.INFO, "Missing WFST file for {0} field in ''{1}'', creating a new one",
new Object[] {field, suggesterDir});

WFSTCompletionLookup lookup = build(indexReader, field);
Expand Down Expand Up @@ -404,12 +404,12 @@ public List<Lookup.LookupResult> lookup(final String field, final String prefix,
try {
WFSTCompletionLookup lookup = lookups.get(field);
if (lookup == null) {
logger.log(Level.WARNING, "No WFST for field {0} in {1}", new Object[] {field, suggesterDir});
logger.log(Level.WARNING, "No WFST for field {0} in ''{1}''", new Object[] {field, suggesterDir});
return Collections.emptyList();
}
return lookup.lookup(prefix, false, resultSize);
} catch (IOException e) {
logger.log(Level.WARNING, "Could not perform lookup in {0} for {1}:{2}",
logger.log(Level.WARNING, "Could not perform lookup in ''{0}'' for {1}:{2}",
new Object[] {suggesterDir, field, prefix});
} finally {
lock.readLock().unlock();
Expand Down

0 comments on commit a95ea5e

Please sign in to comment.