diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000000..6279e5206de --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 1999-2005 The Apache Software Foundation + + Licensed 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. diff --git a/NOTICE.txt b/NOTICE.txt new file mode 100644 index 00000000000..6233b567d50 --- /dev/null +++ b/NOTICE.txt @@ -0,0 +1,5 @@ +Apache log4j Enhanced PatternLayout for log4j 1.2.x +Copyright 2007 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). \ No newline at end of file diff --git a/dist/pom.xml b/dist/pom.xml new file mode 100644 index 00000000000..38c4b798fa8 --- /dev/null +++ b/dist/pom.xml @@ -0,0 +1,211 @@ + + + + + + + 4.0.0 + + Log4j2 Distribution + org.apache.logging.log4j + log4j2-distribution + pom + Log4j2 - Distribution archives. + + + org.apache.logging.log4j + log4j2 + 1.0-alpha1-SNAPSHOT + ../ + + + + + apache-release + + + org.apache.logging.log4j + log4j2-api + ${project.version} + + + org.apache.logging.log4j + log4j2-api + ${project.version} + sources + + + org.apache.logging.log4j + log4j2-api + ${project.version} + javadoc + + + org.apache.logging.log4j + log4j2-core + ${project.version} + + + org.apache.logging.log4j + log4j2-core + ${project.version} + sources + + + org.apache.logging.log4j + log4j2-core + ${project.version} + javadoc + + + org.apache.logging.log4j + log4j2-core + ${project.version} + tests + + + org.apache.logging.log4j + log4j2-jcl + ${project.version} + + + org.apache.logging.log4j + log4j2-jcl + ${project.version} + sources + + + org.apache.logging.log4j + log4j2-jcl + ${project.version} + javadoc + + + org.apache.logging.log4j + log4j2-flume-og + ${project.version} + + + org.apache.logging.log4j + log4j2-flume-og + ${project.version} + sources + + + org.apache.logging.log4j + log4j2-flume-og + ${project.version} + javadoc + + + org.apache.logging.log4j + log4j2-flume-ng + ${project.version} + + + org.apache.logging.log4j + log4j2-flume-ng + ${project.version} + sources + + + org.apache.logging.log4j + log4j2-flume-ng + ${project.version} + javadoc + + + org.apache.logging.log4j + log4j12-api + ${project.version} + + + org.apache.logging.log4j + log4j12-api + ${project.version} + sources + + + org.apache.logging.log4j + log4j12-api + ${project.version} + javadoc + + + org.apache.logging.log4j + slf4j-impl + ${project.version} + + + org.apache.logging.log4j + slf4j-impl + ${project.version} + sources + + + org.apache.logging.log4j + slf4j-impl + ${project.version} + javadoc + + + + + + maven-assembly-plugin + + + + log4j2-source-release-assembly + package + + single + + + log4j2-${project.version} + + src/assembly/src.xml + + gnu + + + + binary + + log4j2-${project.version} + + src/assembly/bin.xml + + gnu + + + single + + package + + + + + + + + diff --git a/dist/src/assembly/bin.xml b/dist/src/assembly/bin.xml new file mode 100644 index 00000000000..b4e23770119 --- /dev/null +++ b/dist/src/assembly/bin.xml @@ -0,0 +1,60 @@ + + + bin + + tar.gz + zip + + false + + + true + + + + + + org.apache.logging.log4j:log4j2-* + org.apache.logging.log4j:slf4j-* + org.apache.logging.log4j:log4j12-* + + + org.apache.logging.log4j:log4j2-distribution + + + false + + + + + + .. + + LICENSE.txt + NOTICE.txt + + + + + + ../RELEASE-NOTES.txt + . + RELEASE-NOTES.txt + + + diff --git a/dist/src/assembly/src.xml b/dist/src/assembly/src.xml new file mode 100644 index 00000000000..a1a1e6833d4 --- /dev/null +++ b/dist/src/assembly/src.xml @@ -0,0 +1,78 @@ + + + + + src + + zip + tar.gz + + + + + .. + / + true + + **/sandbox/** + + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*] + + + + + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?] + + + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?doap_vfs\.rdf] + + + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties] + + + + + ${project.build.directory}/maven-shared-archive-resources/META-INF + / + + + diff --git a/log4j12-api/pom.xml b/log4j12-api/pom.xml index dafd36ebe2a..0ae2a5d0ab6 100644 --- a/log4j12-api/pom.xml +++ b/log4j12-api/pom.xml @@ -21,7 +21,7 @@ org.apache.logging.log4j log4j2 - 1.0-SNAPSHOT + 1.0-alpha1-SNAPSHOT org.apache.logging.log4j log4j12-api diff --git a/log4j2-api/pom.xml b/log4j2-api/pom.xml index 687adeb38ad..dd71a653000 100644 --- a/log4j2-api/pom.xml +++ b/log4j2-api/pom.xml @@ -21,7 +21,7 @@ org.apache.logging.log4j log4j2 - 1.0-SNAPSHOT + 1.0-alpha1-SNAPSHOT org.apache.logging.log4j log4j2-api diff --git a/log4j2-core/pom.xml b/log4j2-core/pom.xml index 15bc604f7d4..c2a72ac1643 100644 --- a/log4j2-core/pom.xml +++ b/log4j2-core/pom.xml @@ -21,7 +21,7 @@ org.apache.logging.log4j log4j2 - 1.0-SNAPSHOT + 1.0-alpha1-SNAPSHOT org.apache.logging.log4j log4j2-core diff --git a/log4j2-flume-ng/pom.xml b/log4j2-flume-ng/pom.xml index 48a2d88d51f..319e087de4b 100644 --- a/log4j2-flume-ng/pom.xml +++ b/log4j2-flume-ng/pom.xml @@ -21,7 +21,7 @@ org.apache.logging.log4j log4j2 - 1.0-SNAPSHOT + 1.0-alpha1-SNAPSHOT org.apache.logging.log4j log4j2-flume-ng diff --git a/log4j2-flume-og/pom.xml b/log4j2-flume-og/pom.xml index 351e74fd190..9dc44f8e81c 100644 --- a/log4j2-flume-og/pom.xml +++ b/log4j2-flume-og/pom.xml @@ -21,7 +21,7 @@ org.apache.logging.log4j log4j2 - 1.0-SNAPSHOT + 1.0-alpha1-SNAPSHOT org.apache.logging.log4j log4j2-flume-og diff --git a/log4j2-jcl/pom.xml b/log4j2-jcl/pom.xml index 3458bada9f1..958dad96503 100644 --- a/log4j2-jcl/pom.xml +++ b/log4j2-jcl/pom.xml @@ -22,7 +22,7 @@ log4j2 org.apache.logging.log4j - 1.0-SNAPSHOT + 1.0-alpha1-SNAPSHOT 4.0.0 diff --git a/pom.xml b/pom.xml index 0f1a09a456e..1ce7a9e70d2 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ log4j2 pom Apache Log4j 2 - 1.0-SNAPSHOT + 1.0-alpha1-SNAPSHOT org.apache apache @@ -92,6 +92,7 @@ 1.6.4 1.0.0 ${basedir} + 1.0-alpha1 @@ -172,17 +173,22 @@ org.apache.maven.plugins maven-release-plugin - 2.2.1 + 2.2.2 org.apache.maven.plugins maven-checkstyle-plugin - 2.7 + 2.9.1 org.apache.maven.plugins maven-javadoc-plugin - 2.8.1-SNAPSHOT + 2.8.1 + + + org.apache.maven.plugins + maven-pmd-plugin + 2.7.1 @@ -206,7 +212,7 @@ org.apache.maven.wagon wagon-ssh - 1.0-beta-7 + 2.2 @@ -301,6 +307,7 @@ log4j2-core slf4j-impl log4j2-jcl + dist @@ -322,5 +329,54 @@ log4j2-flume-og + + release-notes + + + + org.apache.maven.plugins + maven-changes-plugin + 2.6 + + + src/changes + true + . + RELEASE-NOTES.txt + + ${Log4j2ReleaseVersion} + + + + + create-release-notes + generate-resources + + announcement-generate + + + + + + + + + apache-release + + + + maven-assembly-plugin + + + source-release-assembly + + true + + + + + + + diff --git a/slf4j-impl/pom.xml b/slf4j-impl/pom.xml index a9abc69cb85..a3f5403d9aa 100644 --- a/slf4j-impl/pom.xml +++ b/slf4j-impl/pom.xml @@ -21,7 +21,7 @@ org.apache.logging.log4j log4j2 - 1.0-SNAPSHOT + 1.0-alpha1-SNAPSHOT org.apache.logging.log4j slf4j-impl diff --git a/src/changes/announcement.vm b/src/changes/announcement.vm new file mode 100644 index 00000000000..2e71d0440d9 --- /dev/null +++ b/src/changes/announcement.vm @@ -0,0 +1,136 @@ +## 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. + +#set($relVersion=$announceParameters.releaseVersion) + Apache Log4j2 ${releaseVersion} RELEASE NOTES + +The ${developmentTeam} is pleased to announce the Log4j2 ${releaseVersion} release! + +Apache Log4j2 ${relVersion} requires a minimum of Java 5 to build and run. Basic compatibility with +Log4j 1.x is provided through the log4j12-api component, however it does not implement some of the +very implementation specific classes and methods. The package names and Maven groupId have been changed to +org.apache.logging.log4j to avoid any conflicts with log4j 1.x. + +## Hack to improve layout: replace all pairs of spaces with a single new-line +$release.description.replaceAll(" ", " +") + +#if ($release.getActions().size() == 0) +No changes defined in this version. +#else +Changes in this version include: + +#if ($release.getActions('add').size() !=0) +New features: +#foreach($actionItem in $release.getActions('add')) +## Use replaceAll to fix up LF-only line ends on Windows. +#set($action=$actionItem.getAction().replaceAll("\n"," +")) +#if ($actionItem.getIssue()) +#set($issue=$actionItem.getIssue()) +#else +#set($issue="") +#end +#if ($actionItem.getDueTo()) +#set($dueto=$actionItem.getDueTo()) +#else +#set($dueto="") +#end +o#if($!issue != "") $issue: #end ${action} #if($!dueto != "")Thanks to $dueto. #end + +#set($issue="") +#set($dueto="") +#end +#end + +#if ($release.getActions('fix').size() !=0) +Fixed Bugs: +#foreach($actionItem in $release.getActions('fix')) +## Use replaceAll to fix up LF-only line ends on Windows. +#set($action=$actionItem.getAction().replaceAll("\n"," +")) +#if ($actionItem.getIssue()) +#set($issue=$actionItem.getIssue()) +#else +#set($issue="") +#end +#if ($actionItem.getDueTo()) +#set($dueto=$actionItem.getDueTo()) +#else +#set($dueto="") +#end +o#if($!issue != "") $issue: #end ${action} #if($!dueto != "")Thanks to $dueto. #end + +#set($issue="") +#set($dueto="") +#end +#end + +#if ($release.getActions('update').size() !=0) +Changes: +#foreach($actionItem in $release.getActions('update')) +## Use replaceAll to fix up LF-only line ends on Windows. +#set($action=$actionItem.getAction().replaceAll("\n"," +")) +#if ($actionItem.getIssue()) +#set($issue=$actionItem.getIssue()) +#else +#set($issue="") +#end +#if ($actionItem.getDueTo()) +#set($dueto=$actionItem.getDueTo()) +#else +#set($dueto="") +#end +o#if($!issue != "") $issue: #end ${action} #if($!dueto != "")Thanks to $dueto. #end + +#set($issue="") +#set($dueto="") +#end +#end + +#if ($release.getActions('remove').size() !=0) +Removed: +#foreach($actionItem in $release.getActions('remove')) +## Use replaceAll to fix up LF-only line ends on Windows. +#set($action=$actionItem.getAction().replaceAll("\n"," +")) +#if ($actionItem.getIssue()) +#set($issue=$actionItem.getIssue()) +#else +#set($issue="") +#end +#if ($actionItem.getDueTo()) +#set($dueto=$actionItem.getDueTo()) +#else +#set($dueto="") +#end +o#if($!issue != "") $issue. #end ${action} #if($!dueto != "")Thanks to $dueto. #end + +#set($issue="") +#set($dueto="") +#end +#end +## End of main loop +#end + +For complete information on ${project.name}, including instructions on how to submit bug reports, +patches, or suggestions for improvement, see the Apache ${project.name} website: + +${project.url} + + diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 20594617ee0..77b3ab62155 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -22,7 +22,7 @@ - + Level.toLevel would throw an IllegalArgumentException instead of returning the default value. diff --git a/src/site/apt/download.apt b/src/site/apt/download.apt index 6828f81c2a0..378427c5762 100644 --- a/src/site/apt/download.apt +++ b/src/site/apt/download.apt @@ -13,14 +13,14 @@ ~~ See the License for the specific language governing permissions and ~~ limitations under the License. ------ -Download Apache log4j 2.0 +Download Apache Log4j2 ------ ------ ------ -Download Apache log4j 2.0 +Download Apache Log4j2 - Apache log4j 2.0 is distributed under the {{{http://www.apache.org/licenses/LICENSE-2.0.html} Apache License, version 2.0}}. + Apache Log4j2 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, @@ -30,9 +30,9 @@ Download Apache log4j 2.0 *-------------------------+---------+----------+-----------+ | | Mirrors | Checksum | Signature | *-------------------------+---------+----------+-----------+ -| Apache log4j 2.0 (tar.gz) | {{{http://www.apache.org/dyn/closer.cgi/logging/log4j/2.0/apache-log4j-2.0.tar.gz} apache-log4j-2.0.tar.gz}} | {{{http://www.apache.org/dist/logging/log4j/2.0/apache-log4j-2.0.tar.gz.md5} apache-log4j-2.0.tar.gz.md5}} | {{{http://www.apache.org/dist/logging/log4j/2.0/apache-log4j-2.0.tar.gz.asc} apache-log4j-2.0.tar.gz.asc}} | +| Apache Log4j2 (tar.gz) | {{{http://www.apache.org/dyn/closer.cgi/logging/log4j2/apache-log4j2-1.0-alpha1.tar.gz} apache-log4j2-1.0-alpha1.tar.gz}} | {{{http://www.apache.org/dist/logging/log4j2/apache-log4j2-1.0-alpha1.tar.gz.md5} apache-log4j2-1.0-alpha1.tar.gz.md5}} | {{{http://www.apache.org/dist/logging/log4j2/apache-log4j2-1.0-alpha1.tar.gz.asc} apache-log4j2-1.0-alpha1.tar.gz.asc}} | *-------------------------+---------+----------+-----------+ -| Apache log4j 2.0 (zip) | {{{http://www.apache.org/dyn/closer.cgi/logging/log4j/2.0/apache-log4j-2.0.zip} apache-log4j-2.0.zip}} | {{{http://www.apache.org/dist/logging/log4j/2.0/apache-log4j-2.0.zip.md5} apache-log4j-2.0.zip.md5}} | {{{http://www.apache.org/dist/logging/log4j/2.0/apache-log4j-2.0.zip.asc} apache-log4j-2.0.zip.asc}} | +| Apache Log4j2 (zip) | {{{http://www.apache.org/dyn/closer.cgi/logging/log4j2/apache-log4j2-1.0-alpha1.zip} apache-log4j2-1.0-alpha1.zip}} | {{{http://www.apache.org/dist/logging/log4j2/apache-log4j2-1.0-alpha1.zip.md5} apache-log4j2-1.0-alpha1.zip.md5}} | {{{http://www.apache.org/dist/logging/log42/apache-log4j2-1.0-alpha1.zip.asc} apache-log4j2-1.0-alpha1.zip.asc}} | *-------------------------+---------+----------+-----------+ It is essential that you verify the integrity of the downloaded files using the PGP or MD5 signatures. @@ -45,10 +45,10 @@ Download Apache log4j 2.0 --- % gpg --import KEYS -% gpg --verify log4j-2.0.tar.gz.asc +% gpg --verify log4j2-1.0-alpha1.tar.gz.asc --- - Apache log4j 2.0 is signed by Ralph Goers B3D8E1BA + Apache Log4j2 is signed by Ralph Goers B3D8E1BA Alternatively, you can verify the MD5 signature on the files. A unix program called md5 or md5sum is included in many unix distributions. diff --git a/src/site/site.xml b/src/site/site.xml index 4704d4444cf..648e1def5e6 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -19,7 +19,7 @@ org.apache.maven.skins maven-fluido-skin - 1.0-SNAPSHOT + 1.2 diff --git a/src/site/xdoc/api/audit-logging.html b/src/site/xdoc/api/audit-logging.html deleted file mode 100644 index 5a4ba56d46b..00000000000 --- a/src/site/xdoc/api/audit-logging.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Overview - Ralph Goers - - - - Log4J 2.0 - - \ No newline at end of file diff --git a/src/site/xdoc/api/index.html b/src/site/xdoc/api/index.html deleted file mode 100644 index 5a4ba56d46b..00000000000 --- a/src/site/xdoc/api/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Overview - Ralph Goers - - - - Log4J 2.0 - - \ No newline at end of file diff --git a/src/site/xdoc/api/messages.html b/src/site/xdoc/api/messages.html deleted file mode 100644 index 5a4ba56d46b..00000000000 --- a/src/site/xdoc/api/messages.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Overview - Ralph Goers - - - - Log4J 2.0 - - \ No newline at end of file diff --git a/src/site/xdoc/changelog.xml b/src/site/xdoc/changelog.xml index 9d2edd49af7..81423ed51fd 100644 --- a/src/site/xdoc/changelog.xml +++ b/src/site/xdoc/changelog.xml @@ -29,20 +29,20 @@ - +

Release date: TBA

-

JIRA change log

+

JIRA change log

-

Apache Log4j 2.0 is not compatible with the previous versions. Please have the following in mind - when upgrading to Log4j 2.0 in your project:

+

Apache Log4j2 is not compatible with the previous versions. Please have the following in mind + when upgrading to Log4j2 in your project:

  • Java 5 is required
  • The XML configuration has been simplified and is not compatible with Log4j 1.x
  • Configuration via property files is not supported.
  • Configuration via JSON is supported.
  • -
  • Although Log4j 2 is not directly compatible with Log4j 1.x and compatibility bridge +
  • Although Log4j2 is not directly compatible with Log4j 1.x and compatibility bridge has been provided to reduce the need to make coding changes.
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index 3b9e8575744..7a5b433fe7b 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -18,20 +18,20 @@ - Log4J 2.0 Guide + Log4J2 Guide Ralph Goers -
+

- Log4Jj 2.0 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j + Log4j2 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.

-

Some of the features and improvements in Log4j 2.0 are:

+

Some of the features and improvements in Log4j2 are:

API Separation

@@ -46,17 +46,17 @@

Support for multiple APIs

- While the Log4j 2.0 API will provide the best performance, support for the SL4J and Commons Logging + While the Log4j2 API will provide the best performance, support for the SL4J and Commons Logging APIs are provided.

Automatic Reloading of Configurations

- Like Logback, Log4j 2.0 can automatically reload its configuration upon modification. Unlike Logback, + Like Logback, Log4j2 can automatically reload its configuration upon modification. Unlike Logback, it will do so without losing log events while reconfiguration is taking place.

Advanced Filtering

- Like Logback, Log4j 2.0 supports filtering based on context data, markers, regular expressions and + Like Logback, Log4j2 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. @@ -80,7 +80,7 @@

- Log4j 2.0 requires Java 5 but has will take advantage of enhancements in Java 6 to improve performance. + Log4j2 requires Java 5 but has will take advantage of enhancements in Java 6 to improve performance. Some features may require optional dependencies. These dependencies are specified in the documentation for those features.

@@ -88,7 +88,7 @@

- Log4j 2.0 is now available. The API for Log4j 2.0 is not compatible with Log4j 1.x, however an adapter + Log4j2 is now available for testing. The API for Log4j2 is not compatible with Log4j 1.x, however an adapter is available to allow applications to continue to use the Log4j 1.x API. Adapters are also available for Commons Logging and SLF4J.

diff --git a/src/site/xdoc/manual/api.xml b/src/site/xdoc/manual/api.xml index 820ab60741b..d582f7590f1 100644 --- a/src/site/xdoc/manual/api.xml +++ b/src/site/xdoc/manual/api.xml @@ -18,12 +18,12 @@ - Log4J 2.0 API + Log4j2 API Ralph Goers -
+

diff --git a/src/site/xdoc/manual/appenders.xml b/src/site/xdoc/manual/appenders.xml index 7b70d7a437b..fc8e43f0d76 100644 --- a/src/site/xdoc/manual/appenders.xml +++ b/src/site/xdoc/manual/appenders.xml @@ -18,7 +18,7 @@ - Log4j 2 Appenders + Log4j2 Appenders Ralph Goers @@ -1006,7 +1006,7 @@

The SocketAppender is an OutputStreamAppender that writes its output to a remote destination specified by a host and port. The data can be sent over either TCP or UDP and can be sent in any format. - The default format is to send a Serialized LogEvent. Log4j 2.0 contains a SocketServer which is capable + The default format is to send a Serialized LogEvent. Log4j2 contains a SocketServer which is capable of receiving serialized LogEvents and routing them through the logging system on the server.

diff --git a/src/site/xdoc/manual/architecture.xml b/src/site/xdoc/manual/architecture.xml index 028fbb1515a..3a509b9548e 100644 --- a/src/site/xdoc/manual/architecture.xml +++ b/src/site/xdoc/manual/architecture.xml @@ -18,7 +18,7 @@ - Log4j 2 Architecture + Log4j2 Architecture Ralph Goers @@ -26,9 +26,9 @@

Log4j uses the classes shown in the diagram below.

- -

Applications using the Log4j 2 API will request a Logger with a specific name from the + +

Applications using the Log4j2 API will request a Logger with a specific name from the LogManager. The LogManager will locate the appropriate LoggerContext and then obtain the Logger from it. If the Logger must be created it will be associated with the LoggerConfig that contains either a) the same name as the Logger, b) the name of a parent package, or c) the root LoggerConfig. LoggerConfig @@ -45,7 +45,7 @@ developer-chosen criteria.

In Log4j 1.x the Logger Hierarchy was maintained through a relationship between Loggers. - In Log4j 2 this relationship no longers exists. Instead, the hierarchy is maintained + In Log4j2 this relationship no longers exists. Instead, the hierarchy is maintained in the relationship between LoggerConfig objects.

@@ -100,7 +100,7 @@ LogManager.getLogger static method and passing the name of the desired Logger. Further informaiton on the Logging - API can be found atLog4j 2 API. + API can be found atLog4j2 API.

LoggerContext

@@ -183,7 +183,7 @@

LoggerConfigs will be assigned a Log Level. The set of possible - levels includes (TRACE, DEBUG, INFO, WARN, ERROR and FATAL). Note that in Log4j 2, the Level is + levels includes (TRACE, DEBUG, INFO, WARN, ERROR and FATAL). Note that in Log4j2, the Level is an Enum and cannot be sub-classed. Users who desire more granularity are encouraged to use Markers instead. @@ -192,7 +192,7 @@ Log4j 1.x and Logback - both have the concept of "Level Inheritance". In Log4j 2, Loggers and LoggerConfigs are two different + both have the concept of "Level Inheritance". In Log4j2, Loggers and LoggerConfigs are two different objects so this concept is implemented differently. Each Logger references the appropriate LoggerConfig which in turn can reference its parent, thus achieving the same effect.

diff --git a/src/site/xdoc/manual/configuration.xml b/src/site/xdoc/manual/configuration.xml index 97e007f0d80..3612113fa84 100644 --- a/src/site/xdoc/manual/configuration.xml +++ b/src/site/xdoc/manual/configuration.xml @@ -18,7 +18,7 @@ - Configuring Log4j 2 + Configuring Log4j2 Ralph Goers @@ -32,7 +32,7 @@ manage these log statements without the need to modify them manually.

- Configuration of Log4j 2 can be accomplished in 1 of 4 ways: + Configuration of Log4j2 can be accomplished in 1 of 4 ways:

  1. Through a configuration file written in XML or JSON.
  2. Programmatically, by creating a ConfigurationFactory and Configuration implementation.
  3. @@ -43,10 +43,10 @@

    This page focuses primarily on configuring Log4j through a configuration file. Information on - programmatically configuring Log4j can be found at Extending Log4j 2. + programmatically configuring Log4j can be found at Extending Log4j2.

    - Note that unlike Log4j 1.x, the public Log4j 2 API does not expose methods to add, modify or remove + Note that unlike Log4j 1.x, the public Log4j2 API does not expose methods to add, modify or remove appenders and filters or manipulate the configuration in any way.

    @@ -637,7 +637,7 @@

    - Log4j 2 supports the ability to specify tokens in the configuration as references to properties defined + Log4j2 supports the ability to specify tokens in the configuration as references to properties defined elsewhere. Some of these properties will be resolved when the configuration file is interpreted while others may be passed to components where they will be evaluated at runtime. To accomplish this, Log4j uses variations Apache Commons Lang's @@ -761,13 +761,13 @@ to be able to diagnose problems in the logging configuration or in the configured components. Since logging has not been configured, "normal" logging cannot be used during initialization. In addition, normal logging within appenders could create infinite recursion which Log4j will detect and cause - the recursive events to be ignored. To accomodate this need, the Log4j 2 API includes a + the recursive events to be ignored. To accomodate this need, the Log4j2 API includes a StatusLogger. Components declare an instance of the StatusLogger similar to

    protected final static Logger logger = StatusLogger.getLogger();

    - Since StatusLogger implements the Log4j 2 API's Logger interface, all the normal Logger methods may + Since StatusLogger implements the Log4j2 API's Logger interface, all the normal Logger methods may be used.

    @@ -884,7 +884,7 @@ log configuration can be used during testing than what is used in production.

    - A second approach, which is extensively used by Log4j 2, is to set the log4j.configurationFile property + A second approach, which is extensively used by Log4j2, is to set the log4j.configurationFile property in the method annotated with @BeforeClass in the junit test class. This will allow an arbitrarily named file to be used during the test.

    diff --git a/src/site/xdoc/manual/eventlogging.xml b/src/site/xdoc/manual/eventlogging.xml index fb376569c13..cffefd0b915 100644 --- a/src/site/xdoc/manual/eventlogging.xml +++ b/src/site/xdoc/manual/eventlogging.xml @@ -18,12 +18,12 @@ - Log4J 2.0 API + Log4j2 API Ralph Goers -
    +

    diff --git a/src/site/xdoc/manual/extending.xml b/src/site/xdoc/manual/extending.xml index 70e0b67c7c6..d9c461d9792 100644 --- a/src/site/xdoc/manual/extending.xml +++ b/src/site/xdoc/manual/extending.xml @@ -18,7 +18,7 @@ - Extending Log4j 2 + Extending Log4j2 Ralph Goers diff --git a/src/site/xdoc/manual/filters.xml b/src/site/xdoc/manual/filters.xml index e0cce93cc4f..a56850a295f 100644 --- a/src/site/xdoc/manual/filters.xml +++ b/src/site/xdoc/manual/filters.xml @@ -18,7 +18,7 @@ - Log4J 2 Filters + Log4J2 Filters Ralph Goers diff --git a/src/site/xdoc/manual/flowtracing.xml b/src/site/xdoc/manual/flowtracing.xml index 9222297aef7..e658d6da3b9 100644 --- a/src/site/xdoc/manual/flowtracing.xml +++ b/src/site/xdoc/manual/flowtracing.xml @@ -18,12 +18,12 @@ - Log4J 2.0 API + Log4j2 API Ralph Goers -

    +

    diff --git a/src/site/xdoc/manual/index.xml b/src/site/xdoc/manual/index.xml index 22cde4157fb..bb018e0e066 100644 --- a/src/site/xdoc/manual/index.xml +++ b/src/site/xdoc/manual/index.xml @@ -23,7 +23,7 @@ -

    +

    Almost every large application includes its own logging or tracing API. In conformance with this rule, the E.U. - + Log4j 1.x has been widely adopted and used in many applications. However, through the years development on it has slowed down. It has become more difficult to maintain due to its need to be compliant with very old versions of Java. Its alternative, SLF4J/Logback made many needed improvements to the - framework. So why bother with Log4j 2.0? Here are a few of the reasons. + framework. So why bother with Log4j2? Here are a few of the reasons.

      -
    1. Log4j 2.0 is designed to be usable as an audit logging framework. Both Log4j - 1.x and Logback will lose events while reconfiguring. Log4j 2.0 will not. in +
    2. Log4j2 is designed to be usable as an audit logging framework. Both Log4j + 1.x and Logback will lose events while reconfiguring. Log4j2 will not. in Logback exceptions in Appenders are never visible to the application. In - Log4j 2.0 Appenders can be configured to allow the exception to percolate + Log4j2 Appenders can be configured to allow the exception to percolate to the application
    3. -
    4. Log4j 2.0 uses a Plugin system that makes it extremely easy to extend the +
    5. Log4j2 uses a Plugin system that makes it extremely easy to extend the framework by adding new Appenders, Filters, Layouts, Lookups, and Pattern Converters without requiring any changes to Log4j.
    6. -
    7. The performance of Log4j 2.0 is similar to that of Logback. It is slightly +
    8. The performance of Log4j2 is similar to that of Logback. It is slightly slower in some tests and faster in others.
    9. Due to the Plugin system configuration is simpler. Entries in the configuration do not require a class name to be specified.
    10. @@ -99,20 +99,20 @@ manipulated. Users are free to create their own Message types and write custom Layouts, Filters and Lookups to manipulate them.
    11. Log4j 1.x supports Filters on Appenders. Logback added TurboFilters to allow - filtering of events before they are processed by a Logger. Log4j 2.0 supports + filtering of events before they are processed by a Logger. Log4j2 supports Filters that can be configured to process events before they are handled by a Logger, as they are processed by a Logger or on an Appender.
    12. Many Logback Appenders do not accept a Layout and will only send data in a - fixed format. Most Log4j 2.0 Appenders accept a Layout, allowing the data to + fixed format. Most Log4j2 Appenders accept a Layout, allowing the data to be transported in any format desired.
    13. Layouts in Log4j 1.x and Logback return a String. This resulted in the problems discussed at Logback Encoders. - Log4j 2.0 takes the simpler approach that Layouts always return a byte array. This has + Log4j2 takes the simpler approach that Layouts always return a byte array. This has the advantage that it means they can be used in virtually any Appender, not just the ones that write to an OutputStream.
    14. The Syslog Appender supports both TCP and UDP as well as support for the BSD syslog and the RFC 5424 formats.
    15. -
    16. Log4j 2.0 takes advantage of Java 5 concurrency support and performs locking +
    17. Log4j2 takes advantage of Java 5 concurrency support and performs locking at the lowest level possible. Log4j 1.x has known deadlock issues. Many of these are fixed in Logback but many Logback classes still require synchronization at a fairly high level.
    18. diff --git a/src/site/xdoc/manual/layouts.xml b/src/site/xdoc/manual/layouts.xml index adc11a4636f..47b8b9c099b 100644 --- a/src/site/xdoc/manual/layouts.xml +++ b/src/site/xdoc/manual/layouts.xml @@ -18,7 +18,7 @@ - Log4j 2 Layouts + Log4j2 Layouts Ralph Goers @@ -27,7 +27,7 @@

      Layouts are used by Appenders to format the LogEvent into a form that meets the needs of whoever will be consuming the log events. In Log4j 1.x and Logback Layouts were expected to transform an event into a - String. In Log4j 2.0 Layouts return a byte array. This allows the result of the Layout to be useful in + String. In Log4j2 Layouts return a byte array. This allows the result of the Layout to be useful in many more types of Appenders. However, this means most Layouts need to be configured with a Charset to insure the byte array contains correct values. diff --git a/src/site/xdoc/manual/logsep.xml b/src/site/xdoc/manual/logsep.xml index cef66525525..090b0f373f5 100644 --- a/src/site/xdoc/manual/logsep.xml +++ b/src/site/xdoc/manual/logsep.xml @@ -23,6 +23,6 @@ - Log4J 2.0 + Log4J2 \ No newline at end of file diff --git a/src/site/xdoc/manual/lookups.xml b/src/site/xdoc/manual/lookups.xml index a34463f7d6c..39ad12a9488 100644 --- a/src/site/xdoc/manual/lookups.xml +++ b/src/site/xdoc/manual/lookups.xml @@ -18,7 +18,7 @@ - Log4j 2 Lookups + Log4j2 Lookups Ralph Goers diff --git a/src/site/xdoc/manual/markers.xml b/src/site/xdoc/manual/markers.xml index 4cee8a06832..d4632ac6d62 100644 --- a/src/site/xdoc/manual/markers.xml +++ b/src/site/xdoc/manual/markers.xml @@ -18,12 +18,12 @@ - Log4J 2.0 API + Log4j2 API Ralph Goers -

      +

      diff --git a/src/site/xdoc/manual/messages.xml b/src/site/xdoc/manual/messages.xml index eccc09425b0..885923e42e4 100644 --- a/src/site/xdoc/manual/messages.xml +++ b/src/site/xdoc/manual/messages.xml @@ -18,16 +18,16 @@ - Log4J 2.0 API Messages + Log4j2 API Messages Ralph Goers -

      +

      - Although Log4j 2 provides Logger methods that accept Strings and Objects, all of these are ulitmately + Although Log4j2 provides Logger methods that accept Strings and Objects, all of these are ulitmately captured in Message objects that are then associated with the log event. Applications are free to construct Messages of their own and pass them to the Logger. Although it may seem more expensive than passing the message format and parameters directly to the event, testing has shown that with modern diff --git a/src/site/xdoc/manual/plugins.xml b/src/site/xdoc/manual/plugins.xml index 7431edb9ae7..3d575bb2f52 100644 --- a/src/site/xdoc/manual/plugins.xml +++ b/src/site/xdoc/manual/plugins.xml @@ -18,7 +18,7 @@ - Log4j 2 Plugins + Log4j2 Plugins Ralph Goers @@ -30,14 +30,14 @@ Log4j 1.x allowed for extension by requiring class attributes on most of the configuration declarations. In the case of some elements, notably the PatternLayout, the only way to add new pattern converters was to extend the PatternLayout class and add them via code. One of - goals of Log4j 2 is to make extending it extremely easy through the use of plugins. + goals of Log4j2 is to make extending it extremely easy through the use of plugins.

      - In Log4j 2 a plugin is declared by adding a Plugin annotation to the class declaration. During + In Log4j2 a plugin is declared by adding a Plugin annotation to the class declaration. During initialization the Configuration will invoke the PluginManager to locate all the Log4j plugins that are located in the declared packages. As the configuration is processed the appropriate plugins will be automatically configured and - initialized. Log4j 2 utilizes a few different types of plugins which are described in the follownig + initialized. Log4j2 utilizes a few different types of plugins which are described in the follownig sections.

      diff --git a/src/site/xdoc/manual/thread-context.xml b/src/site/xdoc/manual/thread-context.xml index 7799687bd82..a826b1c6be3 100644 --- a/src/site/xdoc/manual/thread-context.xml +++ b/src/site/xdoc/manual/thread-context.xml @@ -18,12 +18,12 @@ - Log4j 2 Thread Context + Log4j2 Thread Context Ralph Goers -
      +

      Introduction

      Log4j introduced the concept of the Mapped Diagnostic Context or MDC. It has been documented and @@ -36,10 +36,10 @@ SLF4J/Logback followed with its own implementation of the MDC, which is documented very well at Mapped Diagnostic Context.

      -

      Log4j 2 continues with the idea of the MDC and the NDC but merges them into a single Thread Context. +

      Log4j2 continues with the idea of the MDC and the NDC but merges them into a single Thread Context. The Thread Context Map is the equivalent of the MDC and the Thread Context Stack is the equivalent of the NDC. Although these are frequently used for purposes other than diagnosing problems, they are still - frequently referred to as the MDC and NDC in Log4j 2 since they are already well known by those acronyms. + frequently referred to as the MDC and NDC in Log4j2 since they are already well known by those acronyms.

      Fish Tagging

      Most real-world systems have to deal with multiple clients simultaneously. In a typical multithreaded diff --git a/src/site/xdoc/performance.xml b/src/site/xdoc/performance.xml index a845b013a8f..9f37ab0bc0d 100644 --- a/src/site/xdoc/performance.xml +++ b/src/site/xdoc/performance.xml @@ -41,7 +41,7 @@

                   Log4j: 4
                   Logback: 5
      -            Log4j 2.0: 3
      +            Log4j2: 3
                   
      The numbers above will vary slightly from run to run so the only conclusion that should be drawn is that all 3 frameworks perform similarly on this task. @@ -63,7 +63,7 @@
                   Log4j: 188
                   Logback: 183
      -            Log4j 2.0: 188
      +            Log4j2: 188
                   
      Again, no conclusion should be drawn regarding relative differences between the frameworks on @@ -71,7 +71,7 @@ the level.

      - The best approach to avoid the cost of parameter construction is to use Log4J 2.0's formatting + The best approach to avoid the cost of parameter construction is to use Log4j2's formatting capabilities. For example, instead of the above write:

                   logger.debug("Entry number: {} is {}", i, entry[i]);
      @@ -80,7 +80,7 @@
                   
                   Log4j: Not supported
                   Logback: 9
      -            Log4j 2.0: 4
      +            Log4j2: 4
                   
      These results show that the difference in performance between the call to isDebugEnabled and logger.debug is barely discernable. @@ -122,14 +122,14 @@

      This is the cost of formatting the log output and sending it to its target destination. Here again, a serious effort was made to make layouts (formatters) perform as quickly as possible. The same - is true for appenders. One of the fundamental tenants of Log4j 2.0 is to use immutable objects whenever + is true for appenders. One of the fundamental tenants of Log4j2 is to use immutable objects whenever possible and to lock at the lowest granularity possible. However, the cost of actually formatting and delivering log events will never be insignificant. For example, the results of writing to a simple log file using the same format using Log4j, Logback and Log4j 2 are:

                   Log4j: 4220
                   Logback: 9671
      -            Log4j 2.0: 4615
      +            Log4j2: 4615