From 28bb85699ef2a37702c01ae99f32f11e4e8e67de Mon Sep 17 00:00:00 2001 From: Brandon Arp Date: Mon, 15 May 2023 12:23:48 -0700 Subject: [PATCH] fix string format in slack alert notifier --- .../metrics/portal/alerts/impl/SlackAlertNotifier.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/com/arpnetworking/metrics/portal/alerts/impl/SlackAlertNotifier.java b/app/com/arpnetworking/metrics/portal/alerts/impl/SlackAlertNotifier.java index 24c13d50e..bdf14ab74 100644 --- a/app/com/arpnetworking/metrics/portal/alerts/impl/SlackAlertNotifier.java +++ b/app/com/arpnetworking/metrics/portal/alerts/impl/SlackAlertNotifier.java @@ -64,8 +64,8 @@ public CompletionStage notify(final Alert alert, final AlertEvaluationResu DateTimeFormatter.RFC_1123_DATE_TIME.format(result.getQueryEndTime().atZone(ZoneOffset.UTC)) )); - message.append("Firing tags:%n"); - message.append("----------------%n"); + message.append(String.format("Firing tags:%n")); + message.append(String.format("----------------%n")); for (final ImmutableMap tag : result.getFiringTags()) { for (final Map.Entry entry : tag.entrySet()) { message.append(String.format( @@ -73,7 +73,7 @@ public CompletionStage notify(final Alert alert, final AlertEvaluationResu entry.getKey(), entry.getValue())); } - message.append("----------------%n"); + message.append(String.format("----------------%n")); } final ObjectNode object = Json.newObject()