diff --git a/extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainerLogConsumer.java b/extensions/devservices/common/src/main/java/io/quarkus/devservices/common/JBossLoggingConsumer.java similarity index 80% rename from extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainerLogConsumer.java rename to extensions/devservices/common/src/main/java/io/quarkus/devservices/common/JBossLoggingConsumer.java index 55c2d4e7bfdbc..e578fd8106c5b 100644 --- a/extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainerLogConsumer.java +++ b/extensions/devservices/common/src/main/java/io/quarkus/devservices/common/JBossLoggingConsumer.java @@ -1,4 +1,4 @@ -package io.quarkus.observability.testcontainers; +package io.quarkus.devservices.common; import java.util.HashMap; import java.util.Map; @@ -11,7 +11,7 @@ /** * A TestContainers consumer for container output that logs output to an JBoss logger. */ -public class LgtmContainerLogConsumer extends BaseConsumer { +public class JBossLoggingConsumer extends BaseConsumer { private final Logger logger; @@ -21,31 +21,31 @@ public class LgtmContainerLogConsumer extends BaseConsumer mdc) { + public JBossLoggingConsumer withMdc(Map mdc) { this.mdc.putAll(mdc); return this; } - public LgtmContainerLogConsumer withSeparateOutputStreams() { + public JBossLoggingConsumer withSeparateOutputStreams() { this.separateOutputStreams = true; return this; } @@ -86,4 +86,4 @@ public void accept(OutputFrame outputFrame) { } } } -} \ No newline at end of file +} diff --git a/extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainer.java b/extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainer.java index a56d503128121..e43ff200631c9 100644 --- a/extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainer.java +++ b/extensions/observability-devservices/testcontainers/src/main/java/io/quarkus/observability/testcontainers/LgtmContainer.java @@ -8,6 +8,7 @@ import org.jboss.logging.Logger; import org.testcontainers.utility.MountableFile; +import io.quarkus.devservices.common.JBossLoggingConsumer; import io.quarkus.observability.common.ContainerConstants; import io.quarkus.observability.common.config.AbstractGrafanaConfig; import io.quarkus.observability.common.config.LgtmConfig; @@ -46,7 +47,7 @@ public LgtmContainer(LgtmConfig config) { // cannot override grafana-dashboards.yaml in the container because it's on a version dependent path: // ./grafana-v11.0.0/conf/provisioning/dashboards/grafana-dashboards.yaml // will replace contents of current dashboards - withLogConsumer(new LgtmContainerLogConsumer(log).withPrefix("LGTM")); + withLogConsumer(new JBossLoggingConsumer(log).withPrefix("LGTM")); withCopyFileToContainer( MountableFile.forClasspathResource("/grafana-dashboard-quarkus-micrometer-prometheus.json"), "/otel-lgtm/grafana-dashboard-red-metrics-classic.json");