--- layout: post status: PUBLISHED published: true title: Log4j 2.8 released excerpt: "The Apache Log4j 2 team is pleased to announce the Log4j 2.8 release!\r\nThis release contains several bugfixes and new features. The new features include the ability\r\nto have the RollingFileAppender log directly to the archive files,\r\na new Apache Cassandra appender,\r\na new ThreadContext::getThreadContextMap API method for custom ThreadContext implementations,\r\nsupport for variables in GelfLayout's additional fields, and\r\nsupport for Lookups in properties' default values. \r\nAlso, this release continues the GC-free epic by updating many more filters and pattern layout\r\nconverters so that they no longer allocate temporary objects during steady state logging.\r\nMore details on the new features and fixes are itemized below.\r\n" id: 21f88e0a-a440-47d0-94d6-f077ecb587fc date: '2017-01-27 16:49:04 -0500' categories: logging tags: - logging - log4j - log4j2 permalink: logging/entry/log4j-2-8-released ---

The Apache Log4j 2 team is pleased to announce the Log4j 2.8 release!

Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade
to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides
many other modern features such as support for Markers, lambda expressions for lazy logging,
property substitution using Lookups, multiple patterns on a PatternLayout and asynchronous
Loggers. Another notable Log4j 2 feature is the ability to be "garbage-free" (avoid allocating
temporary objects) while logging. In addition, Log4j 2 will not lose events while reconfiguring.

This release contains several bugfixes and new features. The new features include the ability
to have the RollingFileAppender log directly to the archive files,
a new Apache Cassandra appender,
a new ThreadContext::getThreadContextMap API method for custom ThreadContext implementations,
support for variables in GelfLayout's additional fields, and
support for Lookups in properties' default values.
Also, this release continues the GC-free epic by updating many more filters and pattern layout
converters so that they no longer allocate temporary objects during steady state logging.
More details on the new features and 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);

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

GA Release 2.8

Changes in this version include:

New features:

Fixed Bugs:

Changes:

Apache Log4j 2.8 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 Apache Log4j 2 website:

http://logging.apache.org/log4j/2.x/