commit | aa1f51edfac9af9fdd8508fe737465c22e6f9531 | [log] [tgz] |
---|---|---|
author | Kenny Ho <y2kenny@gmail.com> | Mon Oct 03 14:55:41 2016 -0400 |
committer | Kenny Ho <y2kenny@gmail.com> | Wed Oct 26 17:37:34 2016 -0400 |
tree | 930168fb29a29ecfc3d71448f1e134e7d5817d1a | |
parent | 406ef8f072ae68c736129ac294eff243ba797fed [diff] |
Add more logs on bad manifests Change-Id: Ifa43108238ffa916c068cd686bf7632c89f05068
diff --git a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/Utilities.java b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/Utilities.java index 68e80e4..73dcddc 100644 --- a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/Utilities.java +++ b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/Utilities.java
@@ -134,7 +134,9 @@ commit.getId(), null); return commit.getId(); } else { - log.warn("Failing to commit manifest subscription update"); + log.warn("Failing to commit manifest subscription update:"+ + "\n\tProject: " + projectName + + "\n\tRef: " + refName); } return null;
diff --git a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/VersionedManifests.java b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/VersionedManifests.java index 6f7b7d3..0e87269 100644 --- a/src/main/java/com/amd/gerrit/plugins/manifestsubscription/VersionedManifests.java +++ b/src/main/java/com/amd/gerrit/plugins/manifestsubscription/VersionedManifests.java
@@ -332,10 +332,10 @@ try (Repository db = gitRepoManager.openRepository(p)) { hash = db.resolve(ref).getName(); } catch (IOException | NullPointerException e) { - log.warn(ref); - log.warn(projectName); - log.warn(defaultRef); - e.printStackTrace(); + log.warn("Cannot resolve ref: " + ref + + "\n\t" + projectName + + "\n\t" + defaultRef + + "\n\t" + Arrays.toString(e.getStackTrace())); } }