Download Apache Log4j 2

Apache Log4j 2 is distributed under the Apache License, version 2.0.

The link in the Mirrors column should display a list of available mirrors with a default selection based on your inferred location. If you do not see that page, try a different browser. The checksum and signature are links to the originals on the main distribution server.

Distribution Mirrors Checksum Signature
Apache Log4j 2 binary (tar.gz) apache-log4j-2.18.0-bin.tar.gz apache-log4j-2.18.0-bin.tar.gz.sha512 apache-log4j-2.18.0-bin.tar.gz.asc
Apache Log4j 2 binary (zip) apache-log4j-2.18.0-bin.zip apache-log4j-2.18.0-bin.zip.sha512 apache-log4j-2.18.0-bin.zip.asc
Apache Log4j 2 source (tar.gz) apache-log4j-2.18.0-src.tar.gz apache-log4j-2.18.0-src.tar.gz.sha512 apache-log4j-2.18.0-src.tar.gz.asc
Apache Log4j 2 source (zip) apache-log4j-2.18.0-src.zip apache-log4j-2.18.0-src.zip.sha512 apache-log4j-2.18.0-src.zip.asc

It is essential that you verify the integrity of the downloaded files using the PGP and SHA512 signatures. Please read Verifying Apache HTTP Server Releases for more information on why you should verify our releases.

The PGP signatures can be verified using PGP or GPG. First download the KEYS as well as the asc signature file for the relevant distribution. Make sure you get these files from the main distribution directory, rather than from a mirror. Then verify the signatures using

gpg --import KEYS
gpg --verify apache-log4j-2.18.0-bin.tar.gz.asc

Apache Log4j 2.18.0 is signed by Ralph Goers (B3D8E1BA)

Alternatively, you can verify the SHA512 signature on the files. A Unix program called sha or sha512sum is included in many Unix distributions.

Previous Releases

  • Log4j 2.12.4 was the last 2.x release to support Java 7
  • Log4j 2.3.2 was the last 2.x release to support Java 6.

The Log4j team no longer provides support for Java 6 or 7.

All previous releases of Apache log4j can be found in the ASF archive repository. Of course, all releases are available for use as dependencies from the Maven Central Repository

Java 7 Release 2.12.4

Distribution Mirrors Checksum Signature
Apache Log4j 2 binary (tar.gz) apache-log4j-2.12.4-bin.tar.gz apache-log4j-2.12.4-bin.tar.gz.sha512 apache-log4j-2.12.4-bin.tar.gz.asc
Apache Log4j 2 binary (zip) apache-log4j-2.12.4-bin.zip apache-log4j-2.12.4-bin.zip.sha512 apache-log4j-2.12.4-bin.zip.asc
Apache Log4j 2 source (tar.gz) apache-log4j-2.12.4-src.tar.gz apache-log4j-2.12.4-src.tar.gz.sha512 apache-log4j-2.12.4-src.tar.gz.asc
Apache Log4j 2 source (zip) apache-log4j-2.12.4-src.zip apache-log4j-2.12.4-src.zip.sha512 apache-log4j-2.12.4-src.zip.asc

Java 6 Release 2.3.2

Distribution Mirrors Checksum Signature
Apache Log4j 2 binary (tar.gz) apache-log4j-2.3.2-bin.tar.gz apache-log4j-2.3.2-bin.tar.gz.sha512 apache-log4j-2.3.2-bin.tar.gz.asc
Apache Log4j 2 binary (zip) apache-log4j-2.3.2-bin.zip apache-log4j-2.3.2-bin.zip.sha512 apache-log4j-2.3.2-bin.zip.asc
Apache Log4j 2 source (tar.gz) apache-log4j-2.3.2-src.tar.gz apache-log4j-2.3.2-src.tar.gz.sha512 apache-log4j-2.3.2-src.tar.gz.asc
Apache Log4j 2 source (zip) apache-log4j-2.3.2-src.zip apache-log4j-2.3.2-src.zip.sha512 apache-log4j-2.3.2-src.zip.asc

Using Log4j on your classpath

To use Log4j 2 in your application make sure that both the API and Core jars are in the application's classpath. Add the dependencies listed below to your classpath.

log4j-api-2.18.0.jar
log4j-core-2.18.0.jar

You can do this from the command line or a manifest file.