发布于 2016-05-30 00:25:34 | 203 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的Log4j教程,程序狗速度看过来!

Apache Log4j log记录软件

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


Log4j 2.6 发布了,本次发布的一些新特性:

o LOG4J2-1270:  (GC) Added support for garbage-free logging in steady state.
        This includes Async Loggers and logging synchronously to the console and to a file,
        but does not include the AsyncAppender. This release makes the GelfLayout and
        the main patterns in the PatternLayout garbage-free.
o LOG4J2-1297:  (GC) Added manual page on garbage-free logging.
o LOG4J2-1373:  (GC) Update Logger wrapper Generator tool to generate methods for the new
Logger methods.
o LOG4J2-1326:  (GC) Added methods to the Logger interface for logging CharSequence messages.

o LOG4J2-1344:  (GC) FileAppender, RollingFileAppender and MemoryMappedFileAppender are now
also garbage-free by default.
o LOG4J2-1278:  (GC) Added unrolled varargs methods to Logger API, added Unbox utility to
avoid auto-boxing when logging primitive values.
o LOG4J2-1271:  (GC) Add MessageFactory that avoid allocation by reusing a cached ParameterizedMessage
instance.
o LOG4J2-1293:  (GC) Add interface StringBuilderFormattable to enable converting Messages
and parameters to text without allocating temporary objects.
        ParameterizedMessage, ObjectMessage, SimpleMessage and ThreadDumpMessage now implement
StringBuilderFormattable.
o LOG4J2-1274:  (GC) Add encode(LogEvent, ByteBufferDestination) method to Layout API to enable
converting LogEvents to bytes without creating temporary objects.
o LOG4J2-1362:  Added a YAML layout. Thanks to Gary Gregory.
o LOG4J2-1179:  Documented benchmark results comparing Log4j 2 performance to other logging
libraries.
o LOG4J2-1011:  Document dependencies for layouts.
o LOG4J2-621:  Pattern to drop first N package parts. Thanks to Lee Theobald, Kamal Mettananda,
Gary Gregory.
o LOG4J2-494:  Support merging configurations to for a composite configuration. Thanks to
Philipp Knobel.
o LOG4J2-1357:  Option to not log stack traces for logged Throwables in GelfLayout.
o LOG4J2-1348:  Add an AutoCloseable ThreadContext class: CloseableThreadContext. Thanks to
Greg Thomas, Gary Gregory.
o LOG4J2-1299:  Add pattern converter for thread id and priority in PatternLayout.
o LOG4J2-124:  Add shutdown methods to LogManager.
o LOG4J2-1221:  Added async logger Timeout wait strategy and made this the default wait strategy
for async loggers.
        This prevents a rare deadlock that may occur on Solaris. Thanks to Michael Barker.

o LOG4J2-1080:  Added option to discard events below a certain log level if the async logger
ring buffer
        or async appender queue is full.
o LOG4J2-1237:  Make PatternLayout header and footer accept a pattern. Thanks to Mike Calmus,
Gary Gregory.
o LOG4J2-1244:  Make header and footer values customizable in JSONLayout. Thanks to Anshu
Garg, Remko Popma, Gary Gregory.
o LOG4J2-1245:  Make CSV Layout header and footers accept patterns.
o LOG4J2-1192:  Dynamic Subject for SMTP Appender. Thanks to Jörg Bretschneider, Gary Gregory.

o LOG4J2-1277:  FormattedMessage, MessageFormatMessage and StringFormattedMessage should support
passing in a Locale to ensure appropriate formatting. Thanks to Gary Gregory, Ludovic Hochet.

o LOG4J2-1303:  Add documentation links to runtime dependencies in each component intro page.

o LOG4J2-1252:  JeroMqAppender should support layouts.
o LOG4J2-1217:  PatternLayout option to limit length of text. Thanks to Thies Wellpott.
o LOG4J2-1133:  Add JNDI lookup documentation.
o LOG4J2-1169:  PatternLayout: Possible variable substitution in equals substitution parameter.
Thanks to Gerald Kritzinger.

完整改进记录,可以在这里查看。



历史版本 :
Apache Log4j 2.10.0 正式发布,包含大量更新
Apache Log4j 2.9.1 发布,Java 日志组件
LOG4J 2.9.0 发布,Java 日志组件
Apache Log4j 2.8.2 发布,Java 日志组件 
Log4j 2.8.2 发布,Java 日志组件
Log4j 2.8.1 发布,Java 日志组件
Log4j 2.8 发布,Java 日志组件
LOG4J 2.7 发布,Java 日志组件
Apache Log4j 2.6.2 发布,Java 日志组件
Log4j 2.6 发布,Java 日志组件
Log4j 2.5 发布,Java 日志组件
Apache Log4j 2.4.1 发布,Java 日志组件
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务