The Apache Logging team is pleased to announce the Apache log4j 2.0-alpha1 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 of the improvements available in Logback while fixing some inherent problems in Logback's architecture.

This is the first release of Log4j 2 and is being made available to get feedback from the community.

Some of the features and improvements in Log4j 2 are:

  • API Separation - The API for Log4j is separate from the implementation. It is now clear to application developers what classes and methods they can use with compatibility being assured, while also allowing improvements to be made to the implementation.
  • Designed for Audit Logging - Unlike Log4j 1.x and Logback, Log4j 2 will not lose events during reconfiguration. Log4j 2 also supports Messages, which easily allow audit events to be flow through the framework.
  • Improved Performance - Faster performance than Log4j 1.x in critical areas and similar performance to Logback in most circumstances.
  • Support for multiple APIs - While the Log4j 2 API will provide the best performance, support for SLF4J and Commons Logging APIs are provided.
  • Automatic Reloading of Configurations - Like Logback, Log4j 2 supports filtering based on context data, markers, regular expressions and other components in the Log event and can be specified to apply to all events before being passed to Loggers or as they pass through Appenders. In addition, filters can also be associated with Loggers, Unlike Logback, a common Filter class can be used in any of these circumstances. Log4j 2 currently supports configuration via XML or JSON.
  • Plugin Architecture - All configurable components are defined as Log4j plugins. As such, no Log4j code must be changed to create a new Appender, Layout, Pattern Converter, etc. Log4j will automatically recognize properly defined plugins and use them when they are referenced in the configuration.
  • Property Support - Properties can be referenced in the configuration and either be directly replace or passed to the underlying component where they can be dynamically resolved. Properties can come from values defined in the configuration file, system properties, environment variables, the ThreadContext Map, and data present in the event. Users can further customize the property providers by adding their own Lookup Plugin

For more information see the Log4j 2 web site

Apache log4j 2.0 requires JDK 5 or later.