2.0-rc1 (2014-02-16)

Changes

Added

  • Configure FileAppender buffer size. (for LOG4J2-401 by Gary Gregory)

  • Configure RandomAccessFileAppender buffer size. (for LOG4J2-402 by Gary Gregory)

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

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

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

  • Added option to toggle Thread name caching in AsyncLogger. (for LOG4J2-467 by Remko Popma, Anthony Baldocchi)

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

  • Add Stream interface to Loggers. (for LOG4J2-481 by Ralph Goers, Matt Sicker)

  • Documentation fix: The attribute of Route to refer to an appender is "ref" not "AppenderRef". (for LOG4J2-482 by Remko Popma, Hongdi Ren)

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

Changed

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

  • Add support for custom logging levels. (for LOG4J2-41 by Ralph Goers, Nick Williams)

  • Update Flume Appender to use Flume 1.4.0. (for LOG4J2-453 by Ralph Goers)

  • Update EasyMock to version 3.2. (for LOG4J2-490 by Ralph Goers, Matt Sicker)

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

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

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

  • Renamed the org.apache.logging.log4j.core.appender.db.nosql.couch package to org.apache.logging.log4j.core.appender.db.nosql.couchdb. (for by grobmeier)

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. (for by Nick Williams)

Fixed

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

  • Changed the Servlet 3.0 auto-initializer to add the filter by class to get around a WebLogic bug. (for LOG4J2-344 by Nick Williams, Keir Lawson, Tomasz Wladzinski)

  • (OSGi) logging.log4j-1.2-api doesn’t export the log4j API 1.2. Dependent bundles can not be resolved. (for LOG4J2-345 by Remko Popma, Matt Sicker, Roland Weiglhofer)

  • 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. (for LOG4J2-359 by Nick Williams, Abhinav Shah)

  • (OSGi) Fix NPE during shutdown. (for LOG4J2-377 by Remko Popma, Matt Sicker, Roland Weiglhofer)

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

  • Fixed issues with time-based file rollover (monthly, weekly, hourly and every minute). (for LOG4J2-385 by Remko Popma, Ace Funk, Porfirio Partida)

  • Stop AsyncLoggerConfig Disruptor thread(s), then AsyncAppender thread(s) first before stopping other appenders. (for LOG4J2-392 by Remko Popma, ilynaf, Andre Bogus)

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

  • @EnterpriseNumber" was missing in the ID of structured data when RFC5424Layout is used (for LOG4J2-404 by Ralph Goers, Kamal Bahadur)

  • Configuration was being processed twice at startup. (for LOG4J2-405 by Ralph Goers)

  • (JMX) Unregister all log4j JMX MBeans when the LoggerContext is stopped to allow web application classes to be GC-ed on undeploy. (for LOG4J2-406 by Remko Popma, Kerrigan Joseph)

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

  • Fixed error in documentation code example in manual/eventlogging.html (for LOG4J2-408 by Remko Popma, Matt Sicker, Dongqing Hu)

  • Created a utility to properly escape backslashes before creating URIs, and changed URI creation to use the utility instead of instantiating URI directly. (for LOG4J2-409 by Nick Williams, Frank Steinmann, Thomas Neidhart)

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

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

  • Use the formatted Message in RFC5424Layout for non-StructuredDataMessages. (for LOG4J2-430 by Ralph Goers, David Gstir)

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

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

  • (JMX) Fixed issue where log4j2 LoggerContext did not show up in JMX GUI or JConsole. (for LOG4J2-443 by Remko Popma, Colin Froggatt, Tudor Har)

  • ResolverUtil cannot find packages in file URLs which include the '+' character. (for LOG4J2-445 by Remko Popma, Anthony Baldocchi)

  • XMLLayout does not include marker name. (for LOG4J2-447 by Gary Gregory, Scott Deboy, Jeff Hudren, Mark Paluch)

  • Fixed typo in documentation: system property should be log4j2.loggerContextFactory (for LOG4J2-451 by Remko Popma, Matt Sicker, Vinay Pothnis)

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

  • TimeBasedTriggeringPolicy should use event time millis. (for LOG4J2-454 by Remko Popma, Robin Zhang Tao)

  • RingBufferLogEvent should return Message timestamp for TimestampMessage messages. (for LOG4J2-455 by Remko Popma, Robin Zhang Tao)

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

  • Set external context when constructing the LoggerContext. (for LOG4J2-459 by Ralph Goers)

  • Fix LogEvent to never return null Level, fixes LevelPatternConverter.format may throw NPE. (for LOG4J2-462 by Remko Popma, Daisuke Baba)

  • Fixed documentation for MyApp example application in the Automatic Configuration section (for LOG4J2-463 by Remko Popma, Matt Sicker, Michael Diamond)

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

  • Fix LogEvent to never return null Level, fixes ThresholdFilter throws NPE. (for LOG4J2-465 by Remko Popma, Daisuke Baba)

  • Cannot load log4j2 config file if path contains plus '+' characters. (for LOG4J2-466 by Remko Popma, Jan Tepke)

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

  • Fixed issue where toString methods that perform logging could deadlock AsyncLogger. (for LOG4J2-471 by Remko Popma, Anthony Baldocchi)

  • BaseConfiguration class does not properly implement Configuration interface. (for LOG4J2-472 by Remko Popma, Tal Liron)

  • Changed the MongoDBConnection to add a MongoDB encoding hook instead of a decoding hook. (for LOG4J2-475 by Nick Williams, Matt Sicker)

  • NPE in ClassLoaderContextSelector. (for LOG4J2-477 by Remko Popma, Tal Liron)

  • The message and ndc fields are not JavaScript escaped in JSONLayout. (for LOG4J2-478 by Gary Gregory, Michael Friedmann)

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

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

  • (JMX) Fixed MalformedObjectNameException if context name contains '=' or newline characters. (for LOG4J2-492 by Remko Popma, Shaddy Baddah, Herlani Junior)

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

  • Stop AsyncLoggerConfig Disruptor thread(s), then AsyncAppender thread(s) first before stopping other appenders. (for LOG4J2-511 by Remko Popma, James Pretorius)

  • 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. (for LOG4J2-512 by Nick Williams, Matt Sicker, Chandra Sekhar Kakarla)

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

  • LocalizedMessage serialization is broken. (for LOG4J2-523 by Gary Gregory)

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