LuceneVersionManager: Fix log error messages
The built-in log formatter uses curly braces instead of '%s'. Without this change, log messages look like: WARN com.google.gerrit.lucene.LuceneVersionManager: Not a directory: %s" Change-Id: I60b4c0a788c01f0a48aa8c0f7f9c82d7c380e632
This commit is contained in:
@@ -111,7 +111,7 @@ public class LuceneVersionManager implements LifecycleListener {
|
|||||||
if (!Files.exists(sitePaths.index_dir)) {
|
if (!Files.exists(sitePaths.index_dir)) {
|
||||||
throw new ProvisionException(runReindexMsg);
|
throw new ProvisionException(runReindexMsg);
|
||||||
} else if (!Files.exists(sitePaths.index_dir)) {
|
} else if (!Files.exists(sitePaths.index_dir)) {
|
||||||
log.warn("Not a directory: %s", sitePaths.index_dir.toAbsolutePath());
|
log.warn("Not a directory: {}", sitePaths.index_dir.toAbsolutePath());
|
||||||
throw new ProvisionException(runReindexMsg);
|
throw new ProvisionException(runReindexMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ public class LuceneVersionManager implements LifecycleListener {
|
|||||||
Path p = getDir(sitePaths, def.getName(), schema);
|
Path p = getDir(sitePaths, def.getName(), schema);
|
||||||
boolean isDir = Files.isDirectory(p);
|
boolean isDir = Files.isDirectory(p);
|
||||||
if (Files.exists(p) && !isDir) {
|
if (Files.exists(p) && !isDir) {
|
||||||
log.warn("Not a directory: %s", p.toAbsolutePath());
|
log.warn("Not a directory: {}", p.toAbsolutePath());
|
||||||
}
|
}
|
||||||
int v = schema.getVersion();
|
int v = schema.getVersion();
|
||||||
versions.put(v, new Version<>(
|
versions.put(v, new Version<>(
|
||||||
|
Reference in New Issue
Block a user