Skip to content

Commit 6301056

Browse files
authored
Mention that newer Log4j2 versions do not need additional fields (#379)
1 parent 9c7510b commit 6301056

File tree

1 file changed

+4
-1
lines changed
  • examples/instrumentation-quickstart/src/main/resources

1 file changed

+4
-1
lines changed

examples/instrumentation-quickstart/src/main/resources/log4j2.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-templates -->
2828
<JsonTemplateLayout eventTemplateUri="classpath:GcpLayout.json">
2929
<!-- Extend the included GcpLayout to include the trace and span IDs from Mapped
30-
Diagnostic Context (MDC) so that Cloud Logging can correlate Logs and Spans -->
30+
Diagnostic Context (MDC) so that Cloud Logging can correlate Logs and Spans
31+
32+
Since log4j2 2.24.0, GcpLayout.json already includes trace context logging from MDC and
33+
the below additional fields are no longer needed -->
3134
<EventTemplateAdditionalField
3235
key="logging.googleapis.com/trace"
3336
format="JSON"

0 commit comments

Comments
 (0)