Use Logger's built-in string formatting where possible

Change-Id: Ie1d03cbd17660a777a15961333dbd8c7fbd2e453
This commit is contained in:
David Pursehouse
2018-05-21 12:45:29 +09:00
parent 7cda6c935a
commit 46af8d137d
26 changed files with 114 additions and 121 deletions

View File

@@ -68,7 +68,7 @@ public class SwitchSecureStore extends SiteProgram {
SitePaths sitePaths = new SitePaths(getSitePath());
Path newSecureStorePath = Paths.get(newSecureStoreLib);
if (!Files.exists(newSecureStorePath)) {
log.error(String.format("File %s doesn't exist", newSecureStorePath.toAbsolutePath()));
log.error("File {} doesn't exist", newSecureStorePath.toAbsolutePath());
return -1;
}
@@ -77,8 +77,7 @@ public class SwitchSecureStore extends SiteProgram {
if (currentSecureStoreName.equals(newSecureStore)) {
log.error(
"Old and new SecureStore implementation names "
+ "are the same. Migration will not work");
"Old and new SecureStore implementation names are the same. Migration will not work");
return -1;
}

View File

@@ -79,7 +79,7 @@ class HiddenErrorHandler extends ErrorHandler {
if (!Strings.isNullOrEmpty(req.getQueryString())) {
uri += "?" + req.getQueryString();
}
log.error(String.format("Error in %s %s", req.getMethod(), uri), err);
log.error("Error in {} {}", req.getMethod(), uri, err);
}
}
}