2.0-rc1

Release date

2014-02-16

Added

  • Configure FileAppender buffer size. (LOG4J2-401)

  • Configure RandomAccessFileAppender buffer size. (LOG4J2-402)

  • Format log event time as UNIX time (seconds or milliseconds). (LOG4J2-415)

  • Create a lookup for resource bundle substitution. (LOG4J2-420)

  • (JMX) Added MBeans for instrumenting AsyncAppenders and AsyncLogger RingBuffers, exposing queue size, remaining capacity and other attributes. (LOG4J2-423)

  • Added option to toggle Thread name caching in AsyncLogger. (LOG4J2-467)

  • ThreadContext now uses plain ThreadLocal by default, unless system property isThreadContextMapInheritable has value "true". (LOG4J2-479)

  • Add Stream interface to Loggers. (LOG4J2-481)

  • Documentation fix: The attribute of Route to refer to an appender is "ref" not "AppenderRef". (LOG4J2-482)

  • (JMX) JMX Client GUI should dynamically update when LoggerContext MBeans are registered/unregistered in MBean server. (LOG4J2-530)

Changed

  • PatternLayout option to not output ANSI escape codes if no Console is available. (LOG4J2-413)

  • Add support for custom logging levels. (LOG4J2-41)

  • Update Flume Appender to use Flume 1.4.0. (LOG4J2-453)

  • Update EasyMock to version 3.2. (LOG4J2-490)

  • Space Level numbers by 100 instead of 1. (LOG4J2-507)

  • Rename package org.apache.logging.log4j.core.appender.rolling.helper to org.apache.logging.log4j.core.appender.rolling.action. (LOG4J2-528)

  • Resource leak in Flume appender when it cannot create a BerkeleyDB db. (LOG4J2-532)

  • Renamed the org.apache.logging.log4j.core.appender.db.nosql.couch package to org.apache.logging.log4j.core.appender.db.nosql.couchdb.

Fixed

  • Resolved memory leak by releasing reference to ThreadLocal when AsyncLogger is stopped. (LOG4J2-323)

  • Changed the Servlet 3.0 auto-initializer to add the filter by class to get around a WebLogic bug. (LOG4J2-344)

  • (OSGi) logging.log4j-1.2-api doesn’t export the log4j API 1.2. Dependent bundles can not be resolved. (LOG4J2-345)

  • Changed the Servlet 3.0 auto-initializer so that it does nothing in a Servlet 2.5 or older application. This ensures behavioral consistency across containers. This includes additional fixes to abort initialization if a duplicate filter already exists and to check the actual Servlet EFFECTIVE version. (LOG4J2-359)

  • (OSGi) Fix NPE during shutdown. (LOG4J2-377)

  • Fixed issue that prevented Log4J from working in Google App Engine. (LOG4J2-379)

  • Fixed issues with time-based file rollover (monthly, weekly, hourly and every minute). (LOG4J2-385)

  • Stop AsyncLoggerConfig Disruptor thread(s), then AsyncAppender thread(s) first before stopping other appenders. (LOG4J2-392)

  • Configure properties and setup Interpolator before processing rest of configuration. (LOG4J2-398)

  • @EnterpriseNumber" was missing in the ID of structured data when RFC5424Layout is used (LOG4J2-404)

  • Configuration was being processed twice at startup. (LOG4J2-405)

  • (JMX) Unregister all log4j JMX MBeans when the LoggerContext is stopped to allow web application classes to be GC-ed on undeploy. (LOG4J2-406)

  • Fixed inability to recover from lost database connection in database appenders by connecting (borrowing from pool) on new write internal or on flush. (LOG4J2-407)

  • Fixed error in documentation code example in manual/eventlogging.html (LOG4J2-408)

  • Created a utility to properly escape backslashes before creating URIs, and changed URI creation to use the utility instead of instantiating URI directly. (LOG4J2-409)

  • Fix Event Level / LoggerConfig Level table at the architecture documentation page. (LOG4J2-417)

  • Resolved memory leak by populating AsyncLoggerConfigHelper ring buffer via EventTranslatorTwoArg, eliminating the need for a ThreadLocal. (LOG4J2-425)

  • Use the formatted Message in RFC5424Layout for non-StructuredDataMessages. (LOG4J2-430)

  • Ensured the JDBCAppender commits transactions after a single write or a flush of multiple writes. (LOG4J2-438)

  • Fixed problem with JDBC and JPA appender connectivity in WebSphere by connecting (borrowing from pool) on new write internal or on flush. (LOG4J2-442)

  • (JMX) Fixed issue where log4j2 LoggerContext did not show up in JMX GUI or JConsole. (LOG4J2-443)

  • ResolverUtil cannot find packages in file URLs which include the '+' character. (LOG4J2-445)

  • XMLLayout does not include marker name. (LOG4J2-447)

  • Fixed typo in documentation: system property should be log4j2.loggerContextFactory (LOG4J2-451)

  • Added a ServletContext attribute that, when set to "true", disables Log4j’s auto-initialization in Servlet 3.0+ web applications. (LOG4J2-452)

  • TimeBasedTriggeringPolicy should use event time millis. (LOG4J2-454)

  • RingBufferLogEvent should return Message timestamp for TimestampMessage messages. (LOG4J2-455)

  • Fixed failure of JDBC and JPA appender to properly release database connections by connecting (borrowing from pool) on new write internal or on flush. (LOG4J2-457)

  • Set external context when constructing the LoggerContext. (LOG4J2-459)

  • Fix LogEvent to never return null Level, fixes LevelPatternConverter.format may throw NPE. (LOG4J2-462)

  • Fixed documentation for MyApp example application in the Automatic Configuration section (LOG4J2-463)

  • Support arrays as sub-elements of a JSON configuration. (LOG4J2-464)

  • Fix LogEvent to never return null Level, fixes ThresholdFilter throws NPE. (LOG4J2-465)

  • Cannot load log4j2 config file if path contains plus '+' characters. (LOG4J2-466)

  • hostName property was not being set until after the first configuration element. (LOG4J2-470)

  • Fixed issue where toString methods that perform logging could deadlock AsyncLogger. (LOG4J2-471)

  • BaseConfiguration class does not properly implement Configuration interface. (LOG4J2-472)

  • Changed the MongoDBConnection to add a MongoDB encoding hook instead of a decoding hook. (LOG4J2-475)

  • NPE in ClassLoaderContextSelector. (LOG4J2-477)

  • The message and ndc fields are not JavaScript escaped in JSONLayout. (LOG4J2-478)

  • Fixed issue where toString methods that perform logging could deadlock AsyncAppender. (LOG4J2-485)

  • Fixed the JPAAppender’s overuse of transactions by connecting (borrowing from pool) on new write internal or on flush. (LOG4J2-489)

  • (JMX) Fixed MalformedObjectNameException if context name contains '=' or newline characters. (LOG4J2-492)

  • (JMX - ObjectNames changed!) Unloading one web application unloads JMX MBeans for all web applications. (LOG4J2-500)

  • Stop AsyncLoggerConfig Disruptor thread(s), then AsyncAppender thread(s) first before stopping other appenders. (LOG4J2-511)

  • Exposed Log4j web support interface and methods and the LoggerContext through ServletContext attributes so that threads not affected by filters (such as asynchronous threads) can utilize the LoggerContext. Also updated the Log4j filter so that it supports async. (LOG4J2-512)

  • Switch in log4j-1.2-api Category.getEffectiveLevel has no cases for FATAL, OFF. (LOG4J2-517)

  • LocalizedMessage serialization is broken. (LOG4J2-523)

  • Fixed bugs where rolled log files were overwritten by RollingFile appender with composite time and size based policies. (LOG4J2-531)

Removed

  • Removed the DataSourceConnectionSource and the <DriverManager> plugin for the JDBC Appender. It is not safe to use. Please use the DataSource or factory connection sources backed by a connection pool.