| ~~ Licensed to the Apache Software Foundation (ASF) under one or more |
| ~~ contributor license agreements. See the NOTICE file distributed with |
| ~~ this work for additional information regarding copyright ownership. |
| ~~ The ASF licenses this file to You under the Apache License, Version 2.0 |
| ~~ (the "License"); you may not use this file except in compliance with |
| ~~ the License. You may obtain a copy of the License at |
| ~~ |
| ~~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~~ |
| ~~ Unless required by applicable law or agreed to in writing, software |
| ~~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~~ See the License for the specific language governing permissions and |
| ~~ limitations under the License. |
| ------ |
| Download Apache Log4j 2 |
| ------ |
| ------ |
| ------ |
| |
| Download Apache Log4j 2 |
| |
| Apache Log4j 2 is distributed under the |
| {{{http://www.apache.org/licenses/LICENSE-2.0.html} 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. |
| |
| *-------------------------+---------+----------+-----------+ |
| | | Mirrors | Checksum | Signature | |
| *-------------------------+---------+----------+-----------+ |
| | Apache Log4j 2 binary (tar.gz) | {{{http://www.apache.org/dyn/closer.cgi/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-bin.tar.gz} apache-log4j-${Log4jReleaseVersion}-bin.tar.gz}} | {{{http://www.apache.org/dist/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-bin.tar.gz.md5} apache-log4j-${Log4jReleaseVersion}-bin.tar.gz.md5}} | {{{http://www.apache.org/dist/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-bin.tar.gz.asc} apache-log4j-${Log4jReleaseVersion}-bin.tar.gz.asc}} | |
| *-------------------------+---------+----------+-----------+ |
| | Apache Log4j 2 binary (zip) | {{{http://www.apache.org/dyn/closer.cgi/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-bin.zip} apache-log4j-${Log4jReleaseVersion}-bin.zip}} | {{{http://www.apache.org/dist/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-bin.zip.md5} apache-log4j-${Log4jReleaseVersion}-bin.zip.md5}} | {{{http://www.apache.org/dist/logging/log42/apache-log4j-${Log4jReleaseVersion}-bin.zip.asc} apache-log4j-${Log4jReleaseVersion}-bin.zip.asc}} | |
| *-------------------------+---------+----------+-----------+ |
| | Apache Log4j 2 source (tar.gz) | {{{http://www.apache.org/dyn/closer.cgi/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-src.tar.gz} apache-log4j-${Log4jReleaseVersion}-src.tar.gz}} | {{{http://www.apache.org/dist/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-src.tar.gz.md5} apache-log4j-${Log4jReleaseVersion}-src.tar.gz.md5}} | {{{http://www.apache.org/dist/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-src.tar.gz.asc} apache-log4j-${Log4jReleaseVersion}-src.tar.gz.asc}} | |
| *-------------------------+---------+----------+-----------+ |
| | Apache Log4j 2 source (zip) | {{{http://www.apache.org/dyn/closer.cgi/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-src.zip} apache-log4j-${Log4jReleaseVersion}-src.zip}} | {{{http://www.apache.org/dist/logging/log4j/${Log4jReleaseVersion}/apache-log4j-${Log4jReleaseVersion}-src.zip.md5} apache-log4j-${Log4jReleaseVersion}-src.zip.md5}} | {{{http://www.apache.org/dist/logging/log42/apache-log4j-${Log4jReleaseVersion}-src.zip.asc} apache-log4j-${Log4jReleaseVersion}-src.zip.asc}} | |
| *-------------------------+---------+----------+-----------+ |
| |
| It is essential that you verify the integrity of the downloaded files using the PGP or MD5 signatures. |
| Please read {{{http://httpd.apache.org/dev/verification.html}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 |
| {{{http://www.apache.org/dist/logging/KEYS}KEYS}} as well as the asc signature file for the relevant distribution. |
| Make sure you get these files from the {{{http://www.apache.org/dist/logging/}main distribution directory}}, rather |
| than from a mirror. Then verify the signatures using |
| |
| --- |
| % gpg --import KEYS |
| % gpg --verify apache-log4j-${Log4jReleaseVersion}-bin.tar.gz.asc |
| --- |
| |
| ~~ Apache Log4j 2 is signed by Ralph Goers B3D8E1BA |
| Apache Log4j ${Log4jReleaseVersion} is signed by Matt Sicker (FA1C814D) |
| |
| Alternatively, you can verify the MD5 signature on the files. A unix program called md5 or md5sum is included |
| in many unix distributions. |
| |
| |
| |
| * Previous Releases |
| |
| All previous releases of Apache log4j can be found in the |
| {{{http://archive.apache.org/dist/logging/log4j}archive repository}}. |
| |
| * 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-${Log4jReleaseVersion}.jar |
| log4j-core-${Log4jReleaseVersion}.jar |
| --- |
| |
| You can do this from the command line or a manifest file. |