This is an automated email from the ASF dual-hosted git repository. squakez pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit f4ce1bdb2f3e976422566a0c0657d4e1a27d1117 Author: Pasquale Congiusti <[email protected]> AuthorDate: Thu Jun 4 11:34:04 2026 +0200 chore(component): metrics log on shutdown info level To avoid any potential misunderstanding, we better lower the level of logging. This information is not really a logic warning, but used by any tool that may scrape logging after the application is shut down. --- .../camel/component/micrometer/prometheus/MicrometerPrometheus.java | 5 ++--- .../camel/component/micrometer/json/AbstractMicrometerService.java | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java b/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java index 059db9be5c99..6480db5d121a 100644 --- a/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java +++ b/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java @@ -515,10 +515,9 @@ public class MicrometerPrometheus extends ServiceSupport implements CamelMetrics String[] scrapes = meterRegistry.scrape().split("\n"); for (String s : scrapes) { if (matchesFilter(s, filters)) { - // We put on warn level to make sure it is printed even if the log is - // at higher levels. Important: we also include a start and end tag to make sure the + // we include a start and end tag to make sure the // scraper can more easily identify the metric content. - LOG.warn("#METRIC-START#" + s + "#METRIC-END#"); + LOG.info("#METRIC-START#" + s + "#METRIC-END#"); } } } diff --git a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/json/AbstractMicrometerService.java b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/json/AbstractMicrometerService.java index b35e28ada0da..80bc6b7d3a86 100644 --- a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/json/AbstractMicrometerService.java +++ b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/json/AbstractMicrometerService.java @@ -249,11 +249,10 @@ public class AbstractMicrometerService extends ServiceSupport { .map(AbstractMicrometerService::convertMeterToMap) .forEach(logEntry -> { try { - // We put on warn level to make sure it is printed even if the log is - // at higher levels. Important: we also include a start and end tag to make sure the + // we include a start and end tag to make sure the // scraper can more easily identify the metric content. String metric = "#METRIC-START#" + mapper.writeValueAsString(logEntry) + "#METRIC-END#"; - LOG.warn(metric); + LOG.info(metric); } catch (Exception e) { LOG.error("Error logging metric " + logEntry.get("name"), e); }
