From 3e7b1f0b411492c5ae1e34877c80c8b45b87a71c Mon Sep 17 00:00:00 2001 From: Patrik Ivarsson Date: Fri, 24 Jan 2025 10:13:58 +0100 Subject: [PATCH] fix cleanup of loggerConfig Signed-off-by: Patrik Ivarsson --- .../core/instrument/binder/logging/Log4j2Metrics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/logging/Log4j2Metrics.java b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/logging/Log4j2Metrics.java index f704fc68ce..159c28db49 100644 --- a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/logging/Log4j2Metrics.java +++ b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/logging/Log4j2Metrics.java @@ -162,7 +162,7 @@ private void removeMetricsFilter(Configuration configuration) { .filter(loggerConfig -> !loggerConfig.isAdditive()) .forEach(loggerConfig -> { if (loggerConfig != rootLoggerConfig) { - metricsFilters.values().forEach(rootLoggerConfig::removeFilter); + metricsFilters.values().forEach(loggerConfig::removeFilter); } }); }