Describe the bug
SystemOutLogRecordExporter omits the log record's severity text from its output.
Steps to reproduce
Emit a log record with a severity text set, then export it with SystemOutLogRecordExporter.
What did you expect to see?
The severity text in the printed line, as the OTLP log exporters serialize both LogRecord.SEVERITY_NUMBER and LogRecord.SEVERITY_TEXT (LogMarshaler, LogStatelessMarshaler).
What did you see instead?
Only the severity number. SystemOutLogRecordExporter.formatLog() (exporters/logging/src/main/java/io/opentelemetry/exporter/logging/SystemOutLogRecordExporter.java line 65) appends log.getSeverity() but never log.getSeverityText().
What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-logging
Version: main @ HEAD
How did you reference these artifacts? implementation("io.opentelemetry:opentelemetry-exporter-logging")
Environment
Compiler: Temurin 21
OS: N/A
Additional context
Severity number and severity text are independent fields, so the original text cannot be recovered from the enum. Custom levels such as log4j's AUDIT map to a generic severity number and are distinguishable only via the severity text. Same gap as #8608, fixed by #8609 for the event name.
Describe the bug
SystemOutLogRecordExporteromits the log record's severity text from its output.Steps to reproduce
Emit a log record with a severity text set, then export it with
SystemOutLogRecordExporter.What did you expect to see?
The severity text in the printed line, as the OTLP log exporters serialize both
LogRecord.SEVERITY_NUMBERandLogRecord.SEVERITY_TEXT(LogMarshaler,LogStatelessMarshaler).What did you see instead?
Only the severity number.
SystemOutLogRecordExporter.formatLog()(exporters/logging/src/main/java/io/opentelemetry/exporter/logging/SystemOutLogRecordExporter.javaline 65) appendslog.getSeverity()but neverlog.getSeverityText().What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-logging
Version: main @ HEAD
How did you reference these artifacts?
implementation("io.opentelemetry:opentelemetry-exporter-logging")Environment
Compiler: Temurin 21
OS: N/A
Additional context
Severity number and severity text are independent fields, so the original text cannot be recovered from the enum. Custom levels such as log4j's
AUDITmap to a generic severity number and are distinguishable only via the severity text. Same gap as #8608, fixed by #8609 for the event name.