summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2018-02-22 13:26:30 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2018-02-25 11:29:47 +0900
commit95d914b0a291b8dc08dcc2a13ec1499e274fdfa4 (patch)
tree586417d565c14713fdccf9760164f670fab2fc36
parente554c9ba01f3771fd539480f4b99e128a1aabe1c (diff)
GerritSshApi: Use Logger's string formatting
-rw-r--r--src/main/java/com/googlesource/gerrit/plugins/replication/GerritSshApi.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/GerritSshApi.java b/src/main/java/com/googlesource/gerrit/plugins/replication/GerritSshApi.java
index 98372d8..08dc296 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/GerritSshApi.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/GerritSshApi.java
@@ -80,10 +80,13 @@ public class GerritSshApi {
execute(uri, cmd, errStream);
} catch (IOException e) {
log.error(
- String.format(
- "Error updating HEAD of remote repository at %s to %s:\n"
- + " Exception: %s\n Command: %s\n Output: %s",
- uri, newHead, e, cmd, errStream),
+ "Error updating HEAD of remote repository at {} to {}:\n"
+ + " Exception: {}\n Command: {}\n Output: {}",
+ uri,
+ newHead,
+ e,
+ cmd,
+ errStream,
e);
return false;
}
@@ -111,7 +114,7 @@ public class GerritSshApi {
URIish sshUri = toSshUri(uri);
return sshHelper.executeRemoteSsh(sshUri, cmd, errStream);
} catch (URISyntaxException e) {
- log.error(String.format("Cannot convert %s to SSH uri", uri), e);
+ log.error("Cannot convert {} to SSH uri", uri, e);
}
return SSH_COMMAND_FAILED;
}