2.6.1 (2016-06-05)

This is the eleventh GA release. It is primarily a bugfix release. More details on the fixes are itemized below.

Note that subsequent to the 2.6 release a minor source incompatibility was found due to the addition of new methods to the Logger interface. If you have code that does:

logger.error(null, “This is the log message”, throwable);

or similar with any log level you will get a compiler error saying the reference is ambiguous. To correct this either do:

logger.error(“This is the log message”, throwable);

or

logger.error((Marker) null, “This is the log message”, throwable);

Log4j 2.6.1 maintains binary compatibility with previous releases.

Log4j 2.6.1 requires a minimum of Java 7 to build and run. Log4j 2.3 was the last release that supported Java 6.

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.

Changes

Added

  • Added documentation about plugin builders compared to factories. (for LOG4J2-1411 by Matt Sicker)

Changed

  • (GC) CSV layouts should not create a new CSVPrinter for each log event. Requires Apache Commons CSV 1.4. (for LOG4J2-1385 by Gary Gregory)

  • Update liquibase-core from 3.4.2 to 3.5.1. (for LOG4J2-1398 by Gary Gregory)

  • Update Apache Commons CSV from 1.3 to 1.4. (for LOG4J2-1399 by Gary Gregory)

Fixed

  • Changed RenameAction to use java.nio to better report rename failures. (for LOG4J2-1032 by Ralph Goers)

  • Logger cache now accounts for message factory. (for LOG4J2-1180 by Gary Gregory)

  • Fixed minor issues with the 2.6 website. (for LOG4J2-1394 by Matt Sicker, Mikael Ståldal)

  • Fix regression in properties configuration to support arbitrary component ids. (for LOG4J2-1402 by Ralph Goers)

  • OnStartupTriggeringPolicy was forcing a rollover of empty files at startup and would append a second footer that was added by the prior shutdown. (for LOG4J2-1405 by Ralph Goers)

  • Fixed bug in ReusableParameterizedMessage where Throwable was never updated so first error was logged over and over again and subsequent errors were not logged. (for LOG4J2-1406 by Remko Popma, Trask Stalnaker)

  • Fixed misleading WARN log events from Log4j about message factories and unexpected formatting. (for LOG4J2-1407 by Gary Gregory)

  • Added the module log4j-liquibase to BOM POM. (for LOG4J2-1408 by Gary Gregory)

  • Fixed ArrayIndexOutOfBoundsException that may occur in ReusableParameterizedMessage. (for LOG4J2-1409 by Remko Popma, Shahan)

  • Add filter and remove filter were not working properly in AbstractFilterable. (for LOG4J2-997 by Ralph Goers, Maytee Chinavanichkit)