内容简介:Apache Log4j 2.11.2 已发布,可用于生产环境。Log4j 2.11.2 是 Log4j 的最新版本,包含在 Log4j 2.6 发布后发现的几个错误修复,可以在最新的变更日志中找到修复内容列表。 要注意的是,Log4j 2 的 API 与 Log4...
Apache Log4j 2.11.2 已发布,可用于生产环境。Log4j 2.11.2 是 Log4j 的最新版本,包含在 Log4j 2.6 发布后发现的几个错误修复,可以在最新的变更日志中找到修复内容列表。
要注意的是,Log4j 2 的 API 与 Log4j 1.x 不兼容,但是可以使用适配器来让应用程序继续使用 Log4j 1.x API。适配器也可用于 Apache Commons Logging, SLF4J 和 java.util.logging。
此外,在 Log4j 2.6 发布之后,由于向 Logger 接口添加了新方法,因此与先前版本出现不兼容问题。 如果你有以下代码:
logger.error(null, "This is the log message", throwable);
或类似于的任何日志级别,将会收到编译器错误,指出引用不明确。要纠正这个错误,要么:
logger.error("This is the log message", throwable);要么
logger.error((Marker) null, "This is the log message", throwable);
Log4j 2.11.2 与之前的版本保持二进制兼容性,下载地址 https://logging.apache.org/log4j/2.x/download.html。
2.11.2 的详细更新内容请查看发布说明。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Practical Django Projects, Second Edition
James Bennett / Apress / 2009 / 44.99
Build a django content management system, blog, and social networking site with James Bennett as he introduces version 1.1 of the popular Django framework. You’ll work through the development of ea......一起来看看 《Practical Django Projects, Second Edition》 这本书的介绍吧!