Show the health check result in HealthCheckFailedException Provide the output of the check results when rendering the HealthCheckFailedException object in logs. Change-Id: I5b1ef87ed36c3c709b70006ec0ea52627c2b037d
diff --git a/src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckFailedException.java b/src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckFailedException.java index 4ebba95..2ea0c14 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckFailedException.java +++ b/src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckFailedException.java
@@ -26,4 +26,9 @@ Map<String, Object> getResult() { return result; } + + @Override + public String toString() { + return "Health check failed: " + result; + } }