w1100n
This site is best viewed in Google Chrome
7/19/2019 15:50

log4j2:

log4j-api:log4j2定义的API
log4j-core:log4j2上述API的实现

log4j1.x > slf4j

log4j-over-slf4j

直接依赖log4j1.x的换成log4j2输出

  • 去掉log4j jar包
  • 加入以下jar包
  • log4j-over-slf4j(实现log4j1切换到slf4j)
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>log4j-over-slf4j</artifactId>
    <version>1.7.28</version>
</dependency>

common logging/jcl > slf4j

https://blog.wiloon.com/?p=8549
jcl-over-slf4j 原本是通过 JCL 输出日志的,会被 jcl-over-slf4j 桥接到slf4j输出

slf4j > log4j1.x

slf4j-log4j12 使用slf4j + log4j1.x 输出日志

common logging/jcl > log4j2.x

log4j-jcl commons-logging到log4j2的桥梁

slf4j > log4j2.x

log4j-slf4j-impl slf4j到log4j2的桥梁

https://my.oschina.net/pingpangkuangmo/blog/410224?p=2

<< Previous Posts Newer Posts >>
辽ICP备14012896