log4j1 如何平滑升级到log4j2呢
来源:互联网 发布:中国大数据安全 编辑:程序博客网 时间:2024/05/20 19:45
如题,log4j1 如何平滑升级到log4j2呢? 原来使用Logger.getLogger方法获取到org.apache.log4j.Logger对象的 ,现在LogManager.getLogger 方法获取到org.apache.logging.log4j.Logger
知道了 有一个专门的jar包 log4j-1.2-api-2.0.jar ,导入就可以了,原来代码没有影响。
官网适配器:http://logging.apache.org/log4j/2.x/log4j-1.2-api/
Log4j 1.2 Bridge
The Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead.
Requirements
The Log4j 1.2 bridge is dependent on the Log4j 2 API and implementation. For more information, see Runtime Dependencies.
Usage
To use the Log4j Legacy Bridge just remove all the Log4j 1.x jars from the application and replace them with the bridge jar. Once in place all logging that uses Log4j 1.x will be routed to Log4j 2. However, applications that attempt to modify legacy Log4j by adding Appenders, Filters, etc may experience problems if they try to verify the success of these actions as these methods are largely no-ops.
- log4j1 如何平滑升级到log4j2呢
- Log4j1升级Log4j2实战
- log4j1.x升级log4j2.x
- Log4j2.x的使用(Log4j1.x升级到Log4j2.x)
- log4j平滑升级为log4j2(不需改动源码)
- nginx平滑升级到0.8.53
- CM4.5平滑升级到CM5.1
- 从ng1到ng2的平滑升级
- centos yum升级到mysql 5.6 指定版本 平滑升级
- slf4j、jcl、jul、log4j1、log4j2、logback大总结
- slf4j、jcl、jul、log4j1、log4j2、logback大总结
- jdk-logging log4j1 log4j2 logback 日志框架介绍
- slf4j 与jul、log4j1、log4j2、logback的集成
- Java日志框架slf4j、jcl、jul、log4j1、log4j2、logback总结
- slf4j、jcl、jul、log4j1、log4j2、logback大总结
- log4j-升级log4j2
- redis平滑升级redis-2.4到redis-2.6
- wdcp(nginx)平滑升级到Tengine 教程!无须重启
- CatLib入门1_路由
- FCN
- python之 函数
- 一招打败你老婆口中的“别人家的老公”
- 全面覆盖
- log4j1 如何平滑升级到log4j2呢
- 微信小程序,页面跳转
- JSP入门
- SpringBoot入门系列之目的确认、前置资料和目录导航
- AppCompatActivity和Activity的区别
- 561. Array Partition I
- iOS应用连接到App Store软件评分
- 时间复杂度和空间复杂度详解
- Httpurlconnetion post