2.1 (2014-10-19)

This is the fourth GA release which contains several bugfixes and new features. There are two new Maven artifacts in this release: log4j-jul and log4j-iostreams. Both components are API-based with optional Core features.

Apache Log4j 2.1 requires a minimum of Java 6 to build and run. Basic compatibility with Log4j 1.x is provided through the log4j-1.2-api component, however it does not implement some of the very implementation specific classes and methods. The package names and Maven groupId have been changed to org.apache.logging.log4j to avoid any conflicts with Log4j 1.x.

For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Log4j 2 website.



  • Implement a GELF layout. (for LOG4J2-428 by Gary Gregory, Mikael Ståldal, Mark Paluch)

  • Added Memory-Mapped File Appender. (for LOG4J2-431 by Remko Popma, Claude Mamo)

  • Add the Log4j IOStreams component. (for LOG4J2-547 by Matt Sicker)

  • Supported filtering on custom log levels in configuration. (for LOG4J2-589 by Remko Popma)

  • Add java.util.logging implementation based on log4j-api. See log4j-jul documentation for more details. (for LOG4J2-608 by Matt Sicker)

  • Add lookup for application main arguments. (for LOG4J2-771 by Gary Gregory)

  • Add lookup for JVM arguments. (for LOG4J2-787 by Gary Gregory)

  • Add support for custom SLF4J Markers in log4j-slf4j-impl module. (for LOG4J2-793 by Matt Sicker)

  • Move reflection utility class to API’s private utility classes. (for LOG4J2-809 by Matt Sicker)

  • Documentation: added section on XInclude to user manual Configuration page. (for LOG4J2-816 by Remko Popma)

  • Add simple validation constraint annotations for the Plugin system. (for LOG4J2-825 by Matt Sicker)

  • Support use of TypeConverter classes through the standard Plugin system. (for LOG4J2-827 by Matt Sicker)

  • Documentation: added Runtime Dependencies link to left nav-bar on site. (for LOG4J2-833 by Remko Popma)

  • Add a Java lookup to provide nicely formatted runtime version information. (for LOG4J2-848 by Gary Gregory)

  • Documentation: add sections on the JUL Adapter, IO Streams and NoSQL Appenders to the Maven and Ivy page. (for LOG4J2-856 by Remko Popma)

  • Add ShutdownCallbackRegistry interface for customizable shutdown callback handling. This is particularly useful for application servers that wish to integrate with Log4j 2. (for LOG4J2-868 by Matt Sicker)


  • Incomplete documentation for JSONLayout. (for LOG4J2-766 by Gary Gregory, Bruno P. Kinoshita)

  • Update Spring Framework to 3.2.11.RELEASE from 3.2.8.RELEASE. (for LOG4J2-780 by Matt Sicker)

  • Update Jackson to 2.4.2 from 2.4.1 (for XML and JSON processing). (for LOG4J2-790 by Gary Gregory)

  • All life cycle implementations should be serializable. This is still work in progress. (for LOG4J2-800 by Gary Gregory)

  • org.apache.logging.log4j.core.Logger should be serializable. This is still work in progress. (for LOG4J2-801 by Gary Gregory)

  • Update javax.mail to 1.5.2 from 1.5.0. (for LOG4J2-810 by Gary Gregory)

  • Unify the two JMS appenders into a single appender. Configurations written for 2.0 will still work in 2.1+. (for LOG4J2-815 by Matt Sicker)

  • Update org.eclipse.persistence.jpa to 2.5.2 from 2.5.1. (for LOG4J2-822 by Gary Gregory)

  • Documentation: updated FAQ "which jars" diagrams for JUL bridge and 2.1 version. (for LOG4J2-831 by Remko Popma)

  • Update JMH to 1.1 from 0.7.2. (for LOG4J2-844 by Remko Popma)

  • Add 2.1.0 to compatible versions in Log4j API ProviderUtil and update Log4jAPIVersion to 2.1.0 in core META-INF/log4j-provider.properties. (for LOG4J2-845 by Matt Sicker)

  • FlumeAppender: maxDelay not in seconds, but milliseconds. Add time scale to some settings, for example maxDelayMillis instead of maxDelay. The old names are aliased for compatibility. (for LOG4J2-867 by Gary Gregory)


  • FlumePersistentManager now handles LockConflictExceptions in Berkeley Db when sending a batch. (for LOG4J2-391 by Ralph Goers, Kamal Bahadur)

  • Fix OSGi Import-Package problem with the JMS API. (for LOG4J2-663 by Matt Sicker, Florian Brunner)

  • Some typo fixes and enhancements for the site. (for LOG4J2-676 by Ralph Goers, Stefan Bodewig)

  • Documentation: fixed minor issues with Log4j2 website/documentation. (for LOG4J2-678 by Remko Popma, Matt Sicker)

  • Avoid ConverterKey plugin clashes by using a more predictable plugin loading infrastructure. Plugins have been segmented into three parts: class path, user-specified packages, and OSGi bundles. (for LOG4J2-745 by Matt Sicker, Scott Harrington)

  • Reduced CachedClock thread contention. (for LOG4J2-753 by Remko Popma)

  • Remove invalid Oracle Maven repository. (for LOG4J2-782 by Matt Sicker)

  • PatternLayout should use platform character encoding by default, not UTF-8. (for LOG4J2-783 by Remko Popma, Minglei Lee)

  • Documentation: fixed capitalization inconsistency in user manual example config. (for LOG4J2-785 by Remko Popma)

  • Fixed issue where log4j-to-slf4j did not work correctly with SLF4J Simple Logger. (for LOG4J2-796 by Remko Popma)

  • Documentation: clarified why log4j-core is a compile-time dependency in Maven and Ivy page. (for LOG4J2-797 by Remko Popma, Andreas Rytina)

  • Fixed plugin scanning redundancy causing massive slowdowns in certain environments. (for LOG4J2-798 by Matt Sicker, Scott Harrington)

  • Prevent NPE when configuration with AsyncLogger/AsyncRoot is reloaded. (for LOG4J2-807 by Remko Popma)

  • SimpleLogger throws ArrayIndexOutOfBoundsException for an empty array. (for LOG4J2-811 by Gary Gregory, Yogesh Rao)

  • MarkerManager Log4jMarker.hasParents() returns opposite of correct result. (for LOG4J2-813 by Gary Gregory, David Erichsen, Brandon Barry)

  • Fixed memory leak in Tomcat 6 caused by clock background threads unintentionally started by Tomcat after web application stop. (for LOG4J2-819 by Matt Sicker, Gary Gregory)

  • Fixed issue in RollingFile filePattern: backslashes are path separators, not escape characters. (for LOG4J2-829 by Remko Popma)

  • Respect external interrupt signal to allow application shutdown after joining AsyncAppender thread. (for LOG4J2-830 by Remko Popma)

  • ThrowableProxy fails if a class in logged stack trace throws java.lang.Error from initializer (for LOG4J2-832 by Gary Gregory, Seth Leger)

  • Migrate JdbcH2AppenderTest JUnit performance test to log4j-perf. (for LOG4J2-840 by Remko Popma)

  • Migrate JdbcHyperSqlAppenderTest JUnit performance test to log4j-perf. (for LOG4J2-841 by Remko Popma)

  • Migrate JpaH2AppenderTest JUnit performance test to log4j-perf. (for LOG4J2-842 by Remko Popma)

  • Migrate JpaHyperSqlAppenderTest JUnit performance test to log4j-perf. (for LOG4J2-843 by Remko Popma)

  • Documentation: fix broken links on Appenders manual page. (for LOG4J2-855 by Remko Popma)

  • Documentation: fix broken links on left navigation Extending Log4j Configuration sub-menu. (for LOG4J2-861 by Remko Popma)

  • Fixed classloader issue that prevented Log4j from finding the implementation when used in a custom Ant task. (for LOG4J2-862 by Matt Sicker, Michael Sutherland)

  • Documentation: fixed missing closing parenthesis in code example. (for LOG4J2-866 by Remko Popma, Gerard Weatherby)