2.19.0

Release date

2022-09-09

This release primarily contains bug fixes 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. SLF4J-2.0.0 alpha releases are not fully supported. See LOG4J2-2975 and SLF4J-511.

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

Apache Log4j 2.19.0 requires a minimum of Java 8 to build and run. Log4j 2.12.4 is the last release to support Java 7. Log4j 2.3.2 is the last release to support Java 6. Java 6 and Java 7 are no longer supported by the Log4j team.

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.

Added

  • Add implementation of SLF4J2 fluent API. (LOG4J2-2975)

  • Add support for SLF4J2 stack-valued MDC. (LOG4J2-3583)

Changed

  • Add getExplicitLevel method to LoggerConfig. (LOG4J2-3572)

  • Allow PropertySources to be added. (LOG4J2-3588)

  • Allow Plugins to be injected with the LoggerContext reference. (LOG4J2-3589)

Fixed

  • Add correct manifest entries for OSGi to log4j-jcl (LOG4J2-3545)

  • Improve support for passwordless keystores. (LOG4J2-3548)

  • SystemPropertyArbiter was assigning the value as the name. (LOG4J2-3550)

  • Make JsonTemplateLayout stack trace truncation operate for each label block. (LOG4J2-3556)

  • Fix recursion between Log4j 1.2 LogManager and Category. (LOG4J2-3557)

  • Fix resolution of properties not starting with log4j2.. (LOG4J2-3559)

  • Logger$PrivateConfig.filter(Level, Marker, String) was allocating empty varargs array. (LOG4J2-3560)

  • Allows a space separated list of style specifiers in the %style pattern for consistency with %highlight. (LOG4J2-3561)

  • Fix NPE in log4j-to-jul in the case the root logger level is null. (LOG4J2-3564)

  • Fix RollingRandomAccessFileAppender with DirectWriteRolloverStrategy can’t create the first log file of different directory. (LOG4J2-3565)

  • Generate new SSL certs for testing. (LOG4J2-3578)

  • Fix ServiceLoaderUtil behavior in the presence of a SecurityManager. (LOG4J2-3579)

  • Make StatusConsoleListener use SimpleLogger internally. (LOG4J2-3584)

  • Fix regression in Rfc5424Layout default values. (LOG4J2-3587)

  • Harden InstantFormatter against delegate failures. (LOG4J2-3614)

  • Add async support to Log4jServletFilter. (LOG4J2-708)

Removed

  • Removed build page in favor of a single build instructions file. (LOG4J2-3573)

  • Remove SLF4J 1.8.x binding. (LOG4J2-3590)