Increase timeout and non-zero exit logs to error level These cases are errors, so it makes more sense to log at error level. Change-Id: I63eb945f1f6a3a5bffc24bfbf4a905f4d80d35a3
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookTask.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookTask.java index 7a7189a..7fbf1a7 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookTask.java +++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookTask.java
@@ -113,7 +113,7 @@ } catch (InterruptedException iex) { // InterruptedException - timeout or cancel args.metrics.timeout(name); - log.warn("hook[{}] timed out: {}", name, iex.getMessage()); + log.error("hook[{}] timed out: {}", name, iex.getMessage()); } catch (Throwable err) { args.metrics.error(name); log.error("Error running hook {}", hook.toAbsolutePath(), err); @@ -122,7 +122,7 @@ if (result != null) { int exitValue = result.getExitValue(); if (exitValue != 0) { - log.warn("hook[{}] exited with error status: {}", name, exitValue); + log.error("hook[{}] exited with error status: {}", name, exitValue); } if (log.isDebugEnabled()) {