[英]log4j-slf4j2-impl does not include log4j-core, is this intentional?
I noticed that log4j-core
has different dependency scope in the two slf4j-impl
libraries.我注意到log4j-core
在两个slf4j-impl
库中有不同的依赖范围。
Is this by design?这是设计使然吗?
Looks like it was changed with this commit , which references LOG4J2-2975 .看起来它已随此提交更改,它引用了 LOG4J2-2975 。 I don't see anything that mentions why the scope
was changed from runtime
to test
.我没有看到任何提及scope
从runtime
更改为test
的内容。
Yes, removing the runtime dependency on log4j-core
was intentional, since the log4j-slf4j2-impl
module works with any implementation of the Log4j2 API.是的,删除对log4j-core
的运行时依赖是有意的,因为log4j-slf4j2-impl
模块适用于 Log4j2 API 的任何实现。
Since version 2.17.2 at least two implementations can be used with the SLF4J-to-LOG4J2 bridge: log4j-core
and log4j-to-jul
(the third implementation maintained by the Log4j2 project, log4j-to-slf4j
, can not be used for obvious reasons).自版本 2.17.2 起,至少有两个实现可以与 SLF4J-to-LOG4J2 桥接一起使用: log4j-core
和log4j-to-jul
(Log4j2 项目维护的第三个实现log4j-to-slf4j
不能使用出于显而易见的原因)。
This choice was not undisputed: cf.这个选择不是没有争议的:cf。 LOG4J2 3601 for a discussion. LOG4J2 3601进行讨论。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.