Fix calls to logger's log(string)
This is in preparation for Google's PII efforts that are planned later.
Google-Bug-Id: b/209582622
Change-Id: Ia779d4bcc0a6d2238908f164c3befc89a157bf52
diff --git a/java/com/google/gerrit/plugins/checks/rules/ChecksSubmitRule.java b/java/com/google/gerrit/plugins/checks/rules/ChecksSubmitRule.java
index de6bf49..5e9c2f2 100644
--- a/java/com/google/gerrit/plugins/checks/rules/ChecksSubmitRule.java
+++ b/java/com/google/gerrit/plugins/checks/rules/ChecksSubmitRule.java
@@ -69,7 +69,7 @@
} catch (RuntimeException e) {
String errorMessage =
String.format("failed to load the current patch set of change %s", changeId);
- logger.atSevere().withCause(e).log(errorMessage);
+ logger.atSevere().withCause(e).log("%s", errorMessage);
return recordForRuleError(errorMessage);
}
@@ -83,7 +83,7 @@
} catch (IOException e) {
String errorMessage =
String.format("failed to evaluate check states for change %s", changeId);
- logger.atSevere().withCause(e).log(errorMessage);
+ logger.atSevere().withCause(e).log("%s", errorMessage);
return recordForRuleError(errorMessage);
}