diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-08-20 15:06:06 +0200 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-08-20 15:06:06 +0200 |
commit | 164a1a7cae616c15be8fac701c4e831d2c3bbeb4 (patch) | |
tree | 1f82afbcd491b7dcd9c68d5a713de7189e6f56be | |
parent | a9d2671d62485cc769bfddd66379d60c64133f49 (diff) |
Print stack trace to log
2 files changed, 8 insertions, 11 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java index 9711c1d8533..e87db02c9bd 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java @@ -524,6 +524,8 @@ public class InternalStepRunner implements StepRunner { String timestamp = timestampFormat.format(new Date(record.getMillis())); for (String line : record.getMessage().split("\n")) out.println(timestamp + ": " + line); + if (record.getThrown() != null) + record.getThrown().printStackTrace(out); record.setSourceClassName(null); // Makes the root logger's ConsoleHandler use the logger name instead, when printing. getParent().log(record); diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Versions.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Versions.java index 719fa7b46dc..1ec64e1b3d6 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Versions.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Versions.java @@ -9,6 +9,7 @@ import com.yahoo.vespa.hosted.controller.application.Change; import com.yahoo.vespa.hosted.controller.application.Deployment; import com.yahoo.vespa.hosted.controller.application.JobStatus; +import java.util.Objects; import java.util.Optional; import static java.util.Objects.requireNonNull; @@ -74,22 +75,16 @@ public class Versions { public boolean equals(Object o) { if (this == o) return true; if ( ! (o instanceof Versions)) return false; - Versions versions = (Versions) o; - - if ( ! targetPlatform.equals(versions.targetPlatform)) return false; - if ( ! targetApplication.equals(versions.targetApplication)) return false; - if ( ! sourcePlatform.equals(versions.sourcePlatform)) return false; - return sourceApplication.equals(versions.sourceApplication); + return Objects.equals(targetPlatform, versions.targetPlatform) && + Objects.equals(targetApplication, versions.targetApplication) && + Objects.equals(sourcePlatform, versions.sourcePlatform) && + Objects.equals(sourceApplication, versions.sourceApplication); } @Override public int hashCode() { - int result = targetPlatform.hashCode(); - result = 31 * result + targetApplication.hashCode(); - result = 31 * result + sourcePlatform.hashCode(); - result = 31 * result + sourceApplication.hashCode(); - return result; + return Objects.hash(targetPlatform, targetApplication, sourcePlatform, sourceApplication); } @Override |