Skip to content

Commit 4776415

Browse files
committed
simplify a bit
1 parent 78aff64 commit 4776415

File tree

1 file changed

+2
-4
lines changed
  • internal-logging/src/main/java/co/elastic/otel/logging

1 file changed

+2
-4
lines changed

internal-logging/src/main/java/co/elastic/otel/logging/AgentLog.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ public static void addSpanLoggingIfRequired(
9292

9393
logPlainText = config.getBoolean(OTEL_JAVAAGENT_DEBUG, false);
9494

95-
List<String> configuredExporters = config.getList("otel.traces.exporter", emptyList());
96-
boolean loggingConfigured =
97-
configuredExporters.stream().anyMatch(e -> e.equals("logging") || e.equals("otlp-logging"));
98-
if (!loggingConfigured) {
95+
List<String> exporters = config.getList("otel.traces.exporter", emptyList());
96+
if (!exporters.contains("logging") && !exporters.contains("otlp-logging")) {
9997
debugLogSpanExporter =
10098
new DebugLogSpanExporter(
10199
logPlainText ? LoggingSpanExporter.create() : OtlpJsonLoggingSpanExporter.create());

0 commit comments

Comments
 (0)