LOG4J 2.7 发布,Java 日志组件

来源:开源中国社区 作者:淡漠悠然
  

 


 

LOG4J 2.7 发布了。

Log4j是Apache的一个开放源代码项目,通过使用Log4j,我们可以控制日志信息输送的目的地是控制台、文件、GUI组件、甚至是套接口服务 器、NT的事件记录器、UNIX Syslog守护进程等;我们也可以控制每一条日志的输出格式;通过定义每一条日志信息的级别,我们能够更加细致地控制日志的生成过程。最令人感兴趣的就 是,这些可以通过一个配置文件来灵活地进行配置,而不需要修改应用的代码。

新特性:

o LOG4J2-1597:  Add a ScriptAppenderSelector to create an Appender specified by a Script.

o LOG4J2-1349:  (GC) Added support for garbage-free ThreadContext map. Disabled by default,

users need to enable this explicitly. 

o LOG4J2-1447:  (GC) Changed LogEvent's internal data structure for context data to be garbage-free.

Added method LogEvent#getContextData(), deprecated method #getContextMap(). 

o LOG4J2-1010:  Users can now inject context data from other sources than ThreadContext. Values

can be any Object, not just Strings. Thanks to Mikael Ståldal. 

o LOG4J2-1568:  Added support for java.util.concurrent.LinkedTransferQueue to AsyncAppender.

Bug 修复:

o LOG4J2-1618:  Fixed ClassCastException when using JUL logging during shutdown. Thanks to

Raman Gupta. 

o LOG4J2-1620:  2.7-rc1: RollingFileAppender immediateFlush default value should be true,

not false. Thanks to Sascha Scholz. 

o LOG4J2-1611:  Improved performance of context data injector for web applications to be on

par with standalone applications. 

o LOG4J2-1591:  Introduced new interface LifeCycle2 with stop(long,TimeUnit) method to avoid

breaking backwards compatibility with new Configurator.shutdown(LoggerContext, long, TimeUnit)

API. 

o LOG4J2-1590:  Fixed issue with filters extending AbstractFilter that did not override methods

with unrolled varargs. 

o LOG4J2-1583:  Fixed scrambled log messages triggered by nested logging from toString() method

of a logging parameter object. Thanks to Larry West.

完整内容,点击此处查看。

下载地址:


时间:2016-10-09 21:07 来源:开源中国社区 作者:淡漠悠然 原文链接

好文,顶一下
(0)
0%
文章真差,踩一下
(0)
0%
------分隔线----------------------------


把开源带在你的身边-精美linux小纪念品
无觅相关文章插件,快速提升流量