2.13.2 (2020-04-23)

This release contains bugfixes and minor enhancements.

Due to a break in compatibility in the SLF4J binding, Log4j now ships with two versions of the SLF4J to Log4j adapters. log4j-slf4j-impl should be used with SLF4J 1.7.x and earlier and log4j-slf4j18-impl should be used with SLF4J 1.8.x and later.

Note that the XML, JSON and YAML formats changed in the 2.11.0 release: they no longer have the timeMillis attribute and instead have an Instant element with epochSecond and nanoOfSecond attributes.

The Log4j 2.13.2 API, as well as many core components, maintains binary compatibility with previous releases.

Log4j 2.13.2 requires a minimum of Java 8 to build and run. Log4j 2.3 was the last release that supported Java 6 and Log4j 2.11.2 is the last release to support Java 7.

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.



  • Provide a Log4j implementation of System.Logger. (for LOG4J2-1360 by Ralph Goers, Kevin Leturc)

  • Added EventLookup to retrieve fields from the log event. (for LOG4J2-2807 by Ralph Goers)


  • Allow the file extension in the file pattern to be modified during reconfiguration. (for LOG4J2-2457 by Ralph Goers)

  • Allow servlet context path to be retrieved without "/". (for LOG4J2-2520 by Ralph Goers)

  • Add ContextDataProviders as an alternative to having to implement a ContextDataInjector. (for LOG4J2-2779 by Ralph Goers)

  • [JDBC] Throw a AppenderLoggingException instead of an NPE in the JDBC database manager. (for LOG4J2-2812 by Gary Gregory)

  • Allow Spring Boot applications to use composite configurations. (for LOG4J2-2815 by Ralph Goers)

  • Allow Spring Lookup to return default and active profiles. (for LOG4J2-2818 by Ralph Goers)

  • Add support for specifying an SSL configuration for SmtpAppender. (for LOG4J2-2819 by Matt Sicker)


  • Add option to restore printing timeMillis in the JsonLayout. (for LOG4J2-2588 by Ralph Goers)

  • Fix Exceptions when whitespace is in the file path and Java security manager is used. (for LOG4J2-2761 by Ralph Goers, Uwe Schindler)

  • Initialize pattern processor before triggering policy during reconfiguration. (for LOG4J2-2766 by Ralph Goers)

  • Conditionally allocate PluginEntry during PluginCache loading. (for LOG4J2-2790 by Ralph Goers, Marius Volkhart)

  • Correct JsonLayout timestamp sorting issue. (for LOG4J2-2791 by Ralph Goers, Johan Karlberg)

  • Allow trailing and leading spaces in log level. (for LOG4J2-2793 by Ralph Goers, Renukaprasad C)

  • Make YamlLayoutTest more resilient to environmental differences. (for LOG4J2-2794 by Ralph Goers, Johan Karlberg)

  • TimeFilter did not handle daylight saving time transitions and did not support a range over 2 days. (for LOG4J2-2805 by Ralph Goers)

  • Avoid NullPointerException when StackWalker returns null. (for LOG4J2-2809 by Ralph Goers, Romain Manni-Bucau)

  • Add information about using a url in log4j.configurationFile. (for LOG4J2-2810 by Ralph Goers)

  • Add missing includeLocation parameter when creating AsyncLogger. (for LOG4J2-2811 by Ralph Goers, Kuojian21)

  • serializeToBytes was checking wrong variable for null. (for LOG4J2-2813 by Ralph Goers, Keith D Gregory)

  • Fix Javadoc for ScriptPatternSelector. (for LOG4J2-2814 by Ralph Goers)

  • Allow the file size action to parse the value without being sensitive to the current locale. (for LOG4J2-2817 by Ralph Goers, Trejkaz)

  • Implement requiresLocation in GelfLayout to reflect whether location information is used in the message Pattern. (for LOG4J2-2824 by Ralph Goers, CrazyBills)