From fa0189c421b1d991397b153465efc932d6ea6954 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 14 Apr 2024 16:57:07 +0100 Subject: [PATCH] don't log so much when saving and writing metrics --- .../java/xyz/mcutils/backend/service/MetricService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/xyz/mcutils/backend/service/MetricService.java b/src/main/java/xyz/mcutils/backend/service/MetricService.java index 896b719..ff4ef31 100644 --- a/src/main/java/xyz/mcutils/backend/service/MetricService.java +++ b/src/main/java/xyz/mcutils/backend/service/MetricService.java @@ -91,11 +91,10 @@ public class MetricService { * Save all metrics to Redis. */ private void saveMetrics() { - log.info("Saving metrics to Redis"); for (Metric metric : metrics.values()) { saveMetric(metric); } - log.info("Saved {} metrics", metrics.size()); + log.info("Saved {} metrics to Redis", metrics.size()); } /** @@ -111,10 +110,9 @@ public class MetricService { * Push all metrics to InfluxDB. */ private void writeToInflux() { - log.info("Writing metrics to InfluxDB"); for (Metric metric : metrics.values()) { influxWriteApi.writePoint(metric.toPoint()); } - log.info("Wrote {} metrics", metrics.size()); + log.info("Wrote {} metrics to Influx", metrics.size()); } }