Skip to content

Commit 4337591

Browse files
lbloderadinauer
andauthored
Make log4j2 integration compatible with log4j 3.0 (getsentry#2634)
Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
1 parent de453e7 commit 4337591

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
### Features
66

77
- Attach Trace Context when an ANR is detected (ANRv1) ([#2583](https://github.com/getsentry/sentry-java/pull/2583))
8+
- Make log4j2 integration compatible with log4j 3.0 ([#2634](https://github.com/getsentry/sentry-java/pull/2634))
9+
- Instead of relying on package scanning, we now use an annotation processor to generate `Log4j2Plugins.dat`
810

911
### Fixes
1012

buildSrc/src/main/java/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ object Config {
6565
val logbackVersion = "1.2.9"
6666
val logbackClassic = "ch.qos.logback:logback-classic:$logbackVersion"
6767

68-
val log4j2Version = "2.17.0"
68+
val log4j2Version = "2.20.0"
6969
val log4j2Api = "org.apache.logging.log4j:log4j-api:$log4j2Version"
7070
val log4j2Core = "org.apache.logging.log4j:log4j-core:$log4j2Version"
7171

sentry-log4j2/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies {
2323
api(projects.sentry)
2424
implementation(Config.Libs.log4j2Api)
2525
implementation(Config.Libs.log4j2Core)
26+
annotationProcessor(Config.Libs.log4j2Core)
2627

2728
compileOnly(Config.CompileOnly.nopen)
2829
errorprone(Config.CompileOnly.nopenChecker)

sentry-samples/sentry-samples-log4j2/src/main/resources/log4j2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<Configuration status="WARN" packages="io.sentry.log4j2">
2+
<Configuration status="WARN">
33
<Appenders>
44
<Console name="Console" target="SYSTEM_OUT">
55
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy