Gradle Version
9.4.1
AGP Version
n/a
Code Minifier/Optimizer
None
Version
6.4.0
Sentry SDK Version
8.39.0
Steps to Reproduce
Have a project with log4j-api, apply the sentry plugin
Expected Result
sentry-log4j2 is added to log4j-core
log4j-api does note necessarily mean that log4j is used as logging backend.
log4j-api is like slf4j just a logging facade and you could use various bindings to process those logging calls.
Also, adding it to log4j-api means it ends up in your compile classpath which makes compilation slower and reduces up-to-date-rate and cache-hit-rate.
The sentry appender can only be used if you actually use log4j-core in your runtime classpath, so the sentry dependency should be added to log4j-core, not to log4j-api.
Actual Result
sentry-log4j2 is added to log4j-api
Gradle Version
9.4.1
AGP Version
n/a
Code Minifier/Optimizer
None
Version
6.4.0
Sentry SDK Version
8.39.0
Steps to Reproduce
Have a project with
log4j-api, apply the sentry pluginExpected Result
sentry-log4j2is added tolog4j-corelog4j-apidoes note necessarily mean that log4j is used as logging backend.log4j-apiis likeslf4jjust a logging facade and you could use various bindings to process those logging calls.Also, adding it to
log4j-apimeans it ends up in your compile classpath which makes compilation slower and reduces up-to-date-rate and cache-hit-rate.The sentry appender can only be used if you actually use
log4j-corein your runtime classpath, so the sentry dependency should be added tolog4j-core, not tolog4j-api.Actual Result
sentry-log4j2is added tolog4j-api