发布于 2016-05-30 00:25:34 | 220 次阅读 | 评论: 0 | 来源: 网友投递
			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.
完整改进记录,可以在这里查看。