内容简介:Log4j 2.11.1 已发布,可用于生产环境。Log4j 2.11.1 是 Log4j 的最新版本,包含在 Log4j 2.6 发布后发现的几个错误修复,可以在最新的变更报告中找到修复内容列表。 要注意的是,Log4j 2 的 API 与 Log4j 1.x 不...
Log4j 2.11.1 已发布,可用于生产环境。Log4j 2.11.1 是 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.1 与之前的版本保持二进制兼容性,下载地址 https://logging.apache.org/log4j/2.x/download.html。
【声明】文章转载自:开源中国社区 [http://www.oschina.net]
以上所述就是小编给大家介绍的《Apache Log4j 2.11.1 发布,流行的 Java 日志组件》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Operating Systems
Remzi Arpaci-Dusseau、Andrea Arpaci-Dusseau / Arpaci-Dusseau Books / 2012-8-19 / USD 21.00
A book about modern operating systems. Topics are broken down into three major conceptual pieces: Virtualization, Concurrency, and Persistence. Includes all major components of modern systems includin......一起来看看 《Operating Systems》 这本书的介绍吧!