Log4j Runtime DependenciesSome Log4J features depend on external libraries. This page lists the required and optional dependencies. As of version 2.10.0 the Log4j API is a Java module (with a module-info.java). Many of the other jars are automatic modules. The characteristics of the modules are:
As of version 2.9.1 Log4j supports Java 9 but will still work in Java 7 or 8. In this version log4j-api is packaged as a multi-release jar and supports the use of the StackWalker and Process APIs. As of version 2.4, Log4J requires Java 7. Log4j version 2.3 and older require Java 6. log4j-coreThe Log4J Implementation has several optional dependencies. See the Dependency Tree for the exact list of JAR files needed for these features.
log4j-dockerLog4j Docker Support requires Jackson annotations, core, and databind. See the Dependency Tree for the exact list of JAR files needed. log4j-jclThe Commons Logging Bridge requires Commons Logging. See the Dependency Tree for the exact list of JAR files needed. log4j-1.2-apiThe Log4j 1.2 Bridge has no external dependencies. This only requires the Log4j API and Log4j Core. log4j-slf4j-implThe Log4j 2 SLF4J Binding depends on the SLF4J API. See the Dependency Tree for the exact list of JAR files needed. Do not use this with the log4j-to-slf4j module. log4j-julThe Log4j 2 Java Util Logging Adapter has no external dependencies. It optionally depends on the Log4j Core library. The only required module is the Log4j API. log4j-to-slf4jThe Log4j 2 to SLF4J Adapter requires the SLF4J API and an SLF4J implementation. See the Dependency Tree for the exact list of JAR files needed. Do not use this with the log4j-slf4j-impl module. log4j-flume-ngThe Flume Appender requires Apache Flume and Apache Avro. The persistent agent uses Berkeley DB. See the Dependency Tree for the exact list of JAR files needed. log4j-spring-cloud-config-clientLog4j Spring Cloud Config Client requires Spring Cloud Config. Spring Cloud Bus is required if notification of logging configuration changes is desired. Spring Boot is required but applications do not have to be packaged as a Spring Boot application. Dependency Tree for the exact list of JAR files needed. log4j-taglibThe Log4j Log Tag Library requires the Jakarta Commons Log Taglib and the Servlet API. See the Dependency Tree for the exact list of JAR files needed. log4j-jmx-guiThe Log4j JMX GUI requires the JConsole jar when run as a JConsole plugin. Otherwise it has no external dependencies. See the Dependency Tree for the exact list of JAR files needed. log4j-webThe Log4j Web module requires the Servlet API. See the Dependency Tree for the exact list of JAR files needed. Note that this works with the Servlet 2.5 API as well as the Servlet 3.x API. log4j-iostreamsThe Log4j IO Streams module has no external dependencies. This only requires the Log4j API. log4j-api-scalaThe Log4j Scala API requires Scala runtime library and reflection in addition to the Log4j API. |