Avoid using Flogger's log(msg, Object) for calls with Object[] argument.
The log(String, Object) overload would output a toString representation
of the Object[] array.
Change-Id: Ice0b5f79df7923754734dfe380c75d141bed1842
diff --git a/java/com/googlesource/gerrit/plugins/supermanifest/SuperManifestRefUpdatedListener.java b/java/com/googlesource/gerrit/plugins/supermanifest/SuperManifestRefUpdatedListener.java
index aaa9a92..0424d02 100644
--- a/java/com/googlesource/gerrit/plugins/supermanifest/SuperManifestRefUpdatedListener.java
+++ b/java/com/googlesource/gerrit/plugins/supermanifest/SuperManifestRefUpdatedListener.java
@@ -118,17 +118,15 @@
}
private void warn(String formatStr, Object... args) {
- // The docs claim that log.warn() uses format strings, but it doesn't seem to work, so we do it
- // explicitly.
- logger.atWarning().log(canonicalWebUrl + " : " + formatStr, args);
+ logger.atWarning().log("%s: %s", canonicalWebUrl, String.format(formatStr, args));
}
private void error(String formatStr, Object... args) {
- logger.atSevere().log(canonicalWebUrl + " : " + formatStr, args);
+ logger.atSevere().log("%s: %s", canonicalWebUrl, String.format(formatStr, args));
}
private void info(String formatStr, Object... args) {
- logger.atInfo().log(canonicalWebUrl + " : " + formatStr, args);
+ logger.atInfo().log("%s: %s", canonicalWebUrl, String.format(formatStr, args));
}
/*