Log stacktrace when replication fails Stack trace provides useful information to better understand what caused the issue Change-Id: Id3c4abe1e1ac05ce60bca401bb91bc47a14cbe7c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java index 370f2fb..1493c13 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java
@@ -376,7 +376,7 @@ repLog.error( String.format("Terminal failure. Cannot replicate [%s] from %s", taskIdHex, uri), e); } catch (TransportException e) { - repLog.error("[{}] Cannot replicate from {}: {}", taskIdHex, uri, e.getMessage()); + repLog.error(String.format("[%s] Cannot replicate from %s", taskIdHex, uri), e); if (replicationType == ReplicationType.ASYNC && e instanceof LockFailureException) { lockRetryCount++; // The LockFailureException message contains both URI and reason