Apache logging services logo Apache log4j logo

Log4j 2 Implementation

The Log4j 2 implementation provides the functional components of the logging system. Users are free to create their own plugins and include them in the logging configuration.

Requirements

Log4j 2 requires Java 6. Some features may require optional dependencies. These dependencies are specified in the documentation for those features.

Below is a list of Log4j features that require external dependencies. See the Dependency Tree for the exact list of JAR files needed for these features.

  • JSON configuration requires the Jackson Data Processor.
  • Async Loggers require the LMAX Disruptor.
  • SMTPAppender requires Javax Mail.
  • JMSQueueAppender and JMSTopicAppender require a JMS implementation like Apache ActiveMQ.
  • Windows color support requires Jansi.
  • The JDBC Appender requires a JDBC driver for the database you choose to write events to.
  • The JPA Appender requires the Java Persistence API classes, a JPA provider implementation, and a decorated entity that the user implements. It also requires an appropriate JDBC driver.
  • The NoSQL Appender with MongoDB provider requires the MongoDB Java Client driver.
  • The NoSQL Appender with Apache CouchDB provider requires the LightCouch CouchDB client library.
  • The NoSQL Appender can be customized with a user-supplied provider, which will require the appropriate client library.