commit | 20aeaa9fcc6aa2665acb5e0f401039074037221c | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Mon Jun 13 07:41:09 2022 +0200 |
committer | David Ostrovsky <david@ostrovsky.org> | Mon Jun 13 07:41:12 2022 +0200 |
tree | af410e87853e734f43161920ac5dcc382913678d | |
parent | d760a4b49f79c31696e425e761cad0fcbfe410c9 [diff] |
Fix FloggerLogString issues flagged by error prone See: [1] for more details. [1] https://errorprone.info/bugpattern/FloggerLogString Change-Id: I82c20d69c74b9ea8430a1cc5fdec5c99ca40534c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookExecutor.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookExecutor.java index 6f2fade..5b642d3 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookExecutor.java +++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookExecutor.java
@@ -65,10 +65,10 @@ return task.get(timeout, TimeUnit.SECONDS); } catch (TimeoutException e) { message = "Synchronous hook timed out " + hook; - logger.atSevere().log(message); + logger.atSevere().log("%s", message); } catch (Exception e) { message = "Error running hook " + hook; - logger.atSevere().withCause(e).log(message); + logger.atSevere().withCause(e).log("%s", message); } task.cancel(true); hookTask.cancel();