Add log4j annotation processor (#11503)

This commit is contained in:
Lauri Tulmin 2024-06-01 11:20:09 +03:00 committed by GitHub
parent 90632a1a25
commit 5c6aa52213
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ The following demonstrates how you might configure the appender in your `log4j.x
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="io.opentelemetry.instrumentation.log4j.appender.v2_17">
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout

View File

@ -4,6 +4,7 @@ plugins {
dependencies {
library("org.apache.logging.log4j:log4j-core:2.17.0")
annotationProcessor("org.apache.logging.log4j:log4j-core:2.17.0")
testImplementation("io.opentelemetry:opentelemetry-sdk-testing")

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN"
packages="com.example.appender,io.opentelemetry.instrumentation.log4j.appender.v2_17">
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="com.example.appender">
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} traceId: %X{trace_id} spanId: %X{span_id} flags: %X{trace_flags} baggage.baggage_key: %X{baggage.baggage_key} - %msg%n" />