Less spammy logging when hook scripts exit with 0

Change-Id: I7bc6a95613f43affc5de01753966a34b7a8a904d
This commit is contained in:
Chad Horohoe
2013-02-12 16:04:12 -05:00
parent ca0bdda4cd
commit bc5575c231

View File

@@ -774,7 +774,12 @@ public class ChangeHookRunner implements ChangeHooks, LifecycleListener {
}
}
log.info("hook[" + getName() + "] exitValue:" + result.getExitValue());
final int exitValue = result.getExitValue();
if (exitValue == 0) {
log.debug("hook[" + getName() + "] exitValue:" + exitValue);
} else {
log.info("hook[" + getName() + "] exitValue:" + exitValue);
}
BufferedReader br =
new BufferedReader(new StringReader(result.getOutput()));