Fix error prone bug pattern FloggerLogString
Some inappropriate usage of flogger logging makes error prone failing:
```error: [FloggerLogString] Arguments to log(String) must be
compile-time constants or parameters annotated with
@CompileTimeConstant. If possible, use Flogger's formatting log methods
instead.```
(see https://errorprone.info/bugpattern/FloggerFormatString)
This makes compilation fail.
Fix by using flogger formatting log method instead.
Change-Id: Idc3e1253adba0c5dbfd3095357eb0b4aab54f61f
diff --git a/src/main/java/com/googlesource/gerrit/plugins/metricsreportercloudwatch/GerritCloudwatchReporter.java b/src/main/java/com/googlesource/gerrit/plugins/metricsreportercloudwatch/GerritCloudwatchReporter.java
index 4803e14..5cc01de 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/metricsreportercloudwatch/GerritCloudwatchReporter.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/metricsreportercloudwatch/GerritCloudwatchReporter.java
@@ -67,9 +67,8 @@
@Override
public void start() {
logger.atInfo().log(
- String.format(
- "Reporting to CloudWatch [namespace:'%s'] at rate of '%d' seconds, after initial delay of %d seconds",
- config.getNamespace(), config.getRate(), config.getInitialDelay()));
+ "Reporting to CloudWatch [namespace:'%s'] at rate of '%d' seconds, after initial delay of %d seconds",
+ config.getNamespace(), config.getRate(), config.getInitialDelay());
cloudWatchReporter.start(config.getInitialDelay(), config.getRate(), TimeUnit.SECONDS);
}