This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git
commit 4bdd635a9a32fdbb5718e2074abcaa069e62ff0a Author: Volkan Yazıcı <[email protected]> AuthorDate: Wed Jan 25 15:15:33 2023 +0100 Add tests for `ChangelogExporter` --- .../changelog/exporter/ChangelogExporter.java | 3 +- .../changelog/exporter/ChangelogExporterArgs.java | 7 +-- .../log4j/changelog/ChangelogExporterTest.java | 42 ++++++++++++++++ .../3-enriched/.2.x.x/.changelog.adoc.ftl | 22 +++++++++ ...Add_getExplicitLevel_method_to_LoggerConfig.xml | 1 + ...ConsoleListener_use_SimpleLogger_internally.xml | 1 + ..._InstantFormatter_against_delegate_failures.xml | 1 + .../3-enriched/.3.x.x/.changelog.adoc.ftl | 22 +++++++++ .../.3.x.x/1220_Simplify_site_generation.xml | 25 ++++++++++ .../1221_switch_from_jira_to_github_issues.xml | 25 ++++++++++ ...notation_to_support_plugin_ordering_when_tw.xml | 27 +++++++++++ .../3-enriched/.changelog-entries.adoc.ftl | 48 +++++++++++++++++++ .../src/test/resources/3-enriched/.index.adoc.ftl | 22 +++++++++ .../3-enriched/2.17.2/.changelog.adoc.ftl | 47 ++++++++++++++++++ .../test/resources/3-enriched/2.17.2/.release.xml | 1 + ...s_initialized_if_the_LoggerFactory_is_provi.xml | 1 + ...ContextDataInjector_initialization_deadlock.xml | 1 + ..._Spring_Boot_Lookup_requires_the_log4j_spri.xml | 1 + .../3-enriched/2.18.0/.changelog.adoc.ftl | 36 ++++++++++++++ .../test/resources/3-enriched/2.18.0/.release.xml | 1 + ...erStrategy_should_use_the_current_time_when.xml | 1 + ...lloverStrategy_was_not_detecting_the_correc.xml | 1 + ...se_Paths_get_to_avoid_circular_file_systems.xml | 1 + .../src/test/resources/4-exported/2.17.2.adoc | 56 ++++++++++++++++++++++ .../src/test/resources/4-exported/2.18.0.adoc | 48 +++++++++++++++++++ .../src/test/resources/4-exported/2.x.x.adoc | 31 ++++++++++++ .../src/test/resources/4-exported/3.x.x.adoc | 31 ++++++++++++ .../src/test/resources/4-exported/index.adoc | 23 +++++++++ 28 files changed, 522 insertions(+), 4 deletions(-) diff --git a/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java b/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java index 01f7637..41d0021 100644 --- a/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java +++ b/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java @@ -34,7 +34,8 @@ public final class ChangelogExporter { private ChangelogExporter() {} public static void main(final String[] mainArgs) { - performExport(ChangelogExporterArgs.fromSystemProperties()); + final ChangelogExporterArgs args = ChangelogExporterArgs.fromSystemProperties(); + performExport(args); } public static void performExport(final ChangelogExporterArgs args) { diff --git a/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporterArgs.java b/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporterArgs.java index 8073e4e..5f25950 100644 --- a/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporterArgs.java +++ b/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporterArgs.java @@ -17,6 +17,7 @@ package org.apache.logging.log4j.changelog.exporter; import java.nio.file.Path; +import java.util.Objects; import static org.apache.logging.log4j.changelog.util.PropertyUtils.requireNonBlankPathProperty; @@ -30,9 +31,9 @@ public final class ChangelogExporterArgs { final Path outputDirectory; - private ChangelogExporterArgs(final Path changelogDirectory, final Path outputDirectory) { - this.changelogDirectory = changelogDirectory; - this.outputDirectory = outputDirectory; + public ChangelogExporterArgs(final Path changelogDirectory, final Path outputDirectory) { + this.changelogDirectory = Objects.requireNonNull(changelogDirectory, "changelogDirectory"); + this.outputDirectory = Objects.requireNonNull(outputDirectory, "outputDirectory"); } static ChangelogExporterArgs fromSystemProperties() { diff --git a/log4j-changelog/src/test/java/org/apache/logging/log4j/changelog/ChangelogExporterTest.java b/log4j-changelog/src/test/java/org/apache/logging/log4j/changelog/ChangelogExporterTest.java new file mode 100644 index 0000000..f015bd1 --- /dev/null +++ b/log4j-changelog/src/test/java/org/apache/logging/log4j/changelog/ChangelogExporterTest.java @@ -0,0 +1,42 @@ +/* + * 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. + */ +package org.apache.logging.log4j.changelog; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.logging.log4j.changelog.exporter.ChangelogExporter; +import org.apache.logging.log4j.changelog.exporter.ChangelogExporterArgs; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.CleanupMode; +import org.junit.jupiter.api.io.TempDir; + +import static org.apache.logging.log4j.changelog.FileTestUtils.assertDirectoryContentMatches; + +class ChangelogExporterTest { + + @Test + void output_should_match(@TempDir(cleanup = CleanupMode.ON_SUCCESS) final Path outputDirectory) { + ChangelogExporterArgs args = new ChangelogExporterArgs( + Paths.get("src/test/resources/3-enriched"), + outputDirectory); + ChangelogExporter.performExport(args); + assertDirectoryContentMatches(outputDirectory, Paths.get("src/test/resources/4-exported")); + } + +} diff --git a/log4j-changelog/src/test/resources/3-enriched/.2.x.x/.changelog.adoc.ftl b/log4j-changelog/src/test/resources/3-enriched/.2.x.x/.changelog.adoc.ftl new file mode 100644 index 0000000..55dd1ed --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.2.x.x/.changelog.adoc.ftl @@ -0,0 +1,22 @@ +//// + 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 + + https://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. +//// + += ${release.version}<#if release.date?has_content> (${release.date})</#if> + +Changes staged for the next 2.x.x version that is yet to be released. + +<#include "../.changelog-entries.adoc.ftl"> diff --git a/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3572_Add_getExplicitLevel_method_to_LoggerConfig.xml b/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3572_Add_getExplicitLevel_method_to_LoggerConfig.xml new file mode 120000 index 0000000..94aefd0 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3572_Add_getExplicitLevel_method_to_LoggerConfig.xml @@ -0,0 +1 @@ +../../2-imported/.2.x.x/LOG4J2-3572_Add_getExplicitLevel_method_to_LoggerConfig.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3584_Make_StatusConsoleListener_use_SimpleLogger_internally.xml b/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3584_Make_StatusConsoleListener_use_SimpleLogger_internally.xml new file mode 120000 index 0000000..f6f9563 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3584_Make_StatusConsoleListener_use_SimpleLogger_internally.xml @@ -0,0 +1 @@ +../../2-imported/.2.x.x/LOG4J2-3584_Make_StatusConsoleListener_use_SimpleLogger_internally.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3614_Harden_InstantFormatter_against_delegate_failures.xml b/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3614_Harden_InstantFormatter_against_delegate_failures.xml new file mode 120000 index 0000000..1fc02fc --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.2.x.x/LOG4J2-3614_Harden_InstantFormatter_against_delegate_failures.xml @@ -0,0 +1 @@ +../../2-imported/.2.x.x/LOG4J2-3614_Harden_InstantFormatter_against_delegate_failures.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/.3.x.x/.changelog.adoc.ftl b/log4j-changelog/src/test/resources/3-enriched/.3.x.x/.changelog.adoc.ftl new file mode 100644 index 0000000..b2d69db --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.3.x.x/.changelog.adoc.ftl @@ -0,0 +1,22 @@ +//// + 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 + + https://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. +//// + += ${release.version}<#if release.date?has_content> (${release.date})</#if> + +Changes staged for the next 3.x.x version that is yet to be released. + +<#include "../.changelog-entries.adoc.ftl"> diff --git a/log4j-changelog/src/test/resources/3-enriched/.3.x.x/1220_Simplify_site_generation.xml b/log4j-changelog/src/test/resources/3-enriched/.3.x.x/1220_Simplify_site_generation.xml new file mode 100644 index 0000000..81f353c --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.3.x.x/1220_Simplify_site_generation.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> +<entry xmlns="http://logging.apache.org/log4j/changelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd" + type="changed"> + <issue id="1220" link="https://github.com/apache/logging-log4j2/pull/1220"/> + <author id="vy"/> + <description format="asciidoc">Simplify Maven `site` phase and align it with the one in `release-2.x` branch</description> +</entry> diff --git a/log4j-changelog/src/test/resources/3-enriched/.3.x.x/1221_switch_from_jira_to_github_issues.xml b/log4j-changelog/src/test/resources/3-enriched/.3.x.x/1221_switch_from_jira_to_github_issues.xml new file mode 100644 index 0000000..333a109 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.3.x.x/1221_switch_from_jira_to_github_issues.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> +<entry xmlns="http://logging.apache.org/log4j/changelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd" + type="changed"> + <issue id="1221" link="https://github.com/apache/logging-log4j2/pull/1221"/> + <author id="vy"/> + <description format="asciidoc">Switch the issue tracker from https://issues.apache.org/jira/browse/LOG4J2[JIRA] to https://github.com/apache/logging-log4j2/issues[GitHub Issues]</description> +</entry> diff --git a/log4j-changelog/src/test/resources/3-enriched/.3.x.x/LOG4J2-857_Add_Ordered_annotation_to_support_plugin_ordering_when_tw.xml b/log4j-changelog/src/test/resources/3-enriched/.3.x.x/LOG4J2-857_Add_Ordered_annotation_to_support_plugin_ordering_when_tw.xml new file mode 100644 index 0000000..ce50aa7 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.3.x.x/LOG4J2-857_Add_Ordered_annotation_to_support_plugin_ordering_when_tw.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> +<entry xmlns="http://logging.apache.org/log4j/changelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd" + type="added"> + <issue id="LOG4J2-857" link="https://issues.apache.org/jira/browse/LOG4J2-857"/> + <author id="mattsicker"/> + <description format="asciidoc"> + Add `@Ordered` annotation to support plugin ordering when two or more plugins within the same category have the same case-insensitive name + </description> +</entry> diff --git a/log4j-changelog/src/test/resources/3-enriched/.changelog-entries.adoc.ftl b/log4j-changelog/src/test/resources/3-enriched/.changelog-entries.adoc.ftl new file mode 100644 index 0000000..a8c18e8 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.changelog-entries.adoc.ftl @@ -0,0 +1,48 @@ +<#-- + 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 + + https://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. +--> +<#if entriesByType?size gt 0>== Changes +<#list entriesByType as entryType, entries> + +== ${entryType?capitalize} + +<#list entries as entry> +* ${entry.description.text?replace("\\s+", " ", "r")} (for <@compress single_line=true> +<#list entry.issues as issue>${issue.link}[${issue.id}]<#if issue?has_next>, </#if></#list> by +<#list entry.authors as author> +<@compress single_line=true> +<#if !author.id?has_content>${author.name} +<#elseif author.id == "rgoers">Ralph Goers +<#elseif author.id == "ggregory">Gary Gregory +<#elseif author.id == "sdeboy">Scott Deboy +<#elseif author.id == "rpopma">Remko Popma +<#elseif author.id == "nickwilliams">Nick Williams +<#elseif author.id == "mattsicker">Matt Sicker +<#elseif author.id == "bbrouwer">Bruce Brouwer +<#elseif author.id == "rgupta">Raman Gupta +<#elseif author.id == "mikes">Mikael Ståldal +<#elseif author.id == "ckozak">Carter Kozak +<#elseif author.id == "vy">Volkan Yazıcı +<#elseif author.id == "rgrabowski">Ron Grabowski +<#elseif author.id == "pkarwasz">Piotr P. Karwasz +<#else>`${author.id}` +</#if> +</@compress><#if author?has_next>, </#if> +</#list> +</@compress>) +</#list> +</#list> +</#if> diff --git a/log4j-changelog/src/test/resources/3-enriched/.index.adoc.ftl b/log4j-changelog/src/test/resources/3-enriched/.index.adoc.ftl new file mode 100644 index 0000000..e6e82ba --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/.index.adoc.ftl @@ -0,0 +1,22 @@ +//// + 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 + + https://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. +//// + += Release changelogs + +<#list releases as release> +* xref:${release.changelogFileName}[${release.version}]<#if release.date?has_content> (${release.date})</#if> +</#list> diff --git a/log4j-changelog/src/test/resources/3-enriched/2.17.2/.changelog.adoc.ftl b/log4j-changelog/src/test/resources/3-enriched/2.17.2/.changelog.adoc.ftl new file mode 100644 index 0000000..d32f334 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.17.2/.changelog.adoc.ftl @@ -0,0 +1,47 @@ +//// + 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 + + https://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. +//// + += ${release.version}<#if release.date?has_content> (${release.date})</#if> + +This release contains the changes noted below: + +* Over 50 improvements and fixes to the Log4j 1.x support. +Continued testing has shown it is a suitable replacement for Log4j 1.x in most cases. +* Scripting now requires a system property be specified naming the languages the user wishes to allow. +The scripting engine will not load if the property isn't set. +* By default, the only remote protocol allowed for loading configuration files is HTTPS. +Users can specify a system property to allow others or prevent remote loading entirely. +* Variable resolution has been modified so that only properties defined as properties in the configuration file can be recursive. +All other Lookups are now non-recursive. +This addresses issues users were having resolving lookups specified in property definitions for use in the `RoutingAppender` and `RollingFileAppender` due to restrictions put in place in 2.17.1. +* Many other fixes and improvements. + +Due to a break in compatibility in the SLF4J binding, Log4j now ships with two versions of the SLF4J to Log4j adapters. +`log4j-slf4j-impl` should be used with SLF4J 1.7.x and earlier and `log4j-slf4j18-impl` should be used with SLF4J 1.8.x and later. +SLF4J-2.0.0 alpha releases are not fully supported. +See https://issues.apache.org/jira/browse/LOG4J2-2975[LOG4J2-2975] and https://jira.qos.ch/browse/SLF4J-511[SLF4J-511]. + +The Log4j 2.17.2 API, as well as many core components, maintains binary compatibility with previous releases. + +Apache Log4j 2.17.2 requires a minimum of Java 8 to build and run. +Log4j 2.12.4 is the last release to support Java 7. +Log4j 2.3.2 is the last release to support Java 6. +Java 6 and Java 7 are no longer supported by the Log4j team. + +For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, or suggestions for improvement, see http://logging.apache.org/log4j/2.x/[the Apache Log4j 2 website]. + +<#include "../.changelog-entries.adoc.ftl"> diff --git a/log4j-changelog/src/test/resources/3-enriched/2.17.2/.release.xml b/log4j-changelog/src/test/resources/3-enriched/2.17.2/.release.xml new file mode 120000 index 0000000..0a00ebf --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.17.2/.release.xml @@ -0,0 +1 @@ +../../2-imported/2.17.2/.release.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3304_Flag_LogManager_as_initialized_if_the_LoggerFactory_is_provi.xml b/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3304_Flag_LogManager_as_initialized_if_the_LoggerFactory_is_provi.xml new file mode 120000 index 0000000..6023bab --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3304_Flag_LogManager_as_initialized_if_the_LoggerFactory_is_provi.xml @@ -0,0 +1 @@ +../../2-imported/2.17.2/LOG4J2-3304_Flag_LogManager_as_initialized_if_the_LoggerFactory_is_provi.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3333_Fix_ThreadContextDataInjector_initialization_deadlock.xml b/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3333_Fix_ThreadContextDataInjector_initialization_deadlock.xml new file mode 120000 index 0000000..e1baeec --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3333_Fix_ThreadContextDataInjector_initialization_deadlock.xml @@ -0,0 +1 @@ +../../2-imported/2.17.2/LOG4J2-3333_Fix_ThreadContextDataInjector_initialization_deadlock.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3405_Document_that_the_Spring_Boot_Lookup_requires_the_log4j_spri.xml b/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3405_Document_that_the_Spring_Boot_Lookup_requires_the_log4j_spri.xml new file mode 120000 index 0000000..aaf2b20 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.17.2/LOG4J2-3405_Document_that_the_Spring_Boot_Lookup_requires_the_log4j_spri.xml @@ -0,0 +1 @@ +../../2-imported/2.17.2/LOG4J2-3405_Document_that_the_Spring_Boot_Lookup_requires_the_log4j_spri.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/2.18.0/.changelog.adoc.ftl b/log4j-changelog/src/test/resources/3-enriched/2.18.0/.changelog.adoc.ftl new file mode 100644 index 0000000..5fa0ffa --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.18.0/.changelog.adoc.ftl @@ -0,0 +1,36 @@ +//// + 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 + + https://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. +//// + += ${release.version}<#if release.date?has_content> (${release.date})</#if> + +This release primarily contains bug fixes and minor enhancements. + +Due to a break in compatibility in the SLF4J binding, Log4j now ships with two versions of the SLF4J to Log4j adapters. +`log4j-slf4j-impl` should be used with SLF4J 1.7.x and earlier and `log4j-slf4j18-impl` should be used with SLF4J 1.8.x and later. +SLF4J-2.0.0 alpha releases are not fully supported. +See https://issues.apache.org/jira/browse/LOG4J2-2975[LOG4J2-2975] and https://jira.qos.ch/browse/SLF4J-511[SLF4J-511]. + +The Log4j 2.18.0 API, as well as many core components, maintains binary compatibility with previous releases. + +Apache Log4j 2.18.0 requires a minimum of Java 8 to build and run. +Log4j 2.12.4 is the last release to support Java 7. +Log4j 2.3.2 is the last release to support Java 6. +Java 6 and Java 7 are no longer supported by the Log4j team. + +For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, or suggestions for improvement, see http://logging.apache.org/log4j/2.x/[the Apache Log4j 2 website]. + +<#include "../.changelog-entries.adoc.ftl"> diff --git a/log4j-changelog/src/test/resources/3-enriched/2.18.0/.release.xml b/log4j-changelog/src/test/resources/3-enriched/2.18.0/.release.xml new file mode 120000 index 0000000..ff01fd8 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.18.0/.release.xml @@ -0,0 +1 @@ +../../2-imported/2.18.0/.release.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3339_DirectWriteRolloverStrategy_should_use_the_current_time_when.xml b/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3339_DirectWriteRolloverStrategy_should_use_the_current_time_when.xml new file mode 120000 index 0000000..8e25b5e --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3339_DirectWriteRolloverStrategy_should_use_the_current_time_when.xml @@ -0,0 +1 @@ +../../2-imported/2.18.0/LOG4J2-3339_DirectWriteRolloverStrategy_should_use_the_current_time_when.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3490_The_DirectWriteRolloverStrategy_was_not_detecting_the_correc.xml b/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3490_The_DirectWriteRolloverStrategy_was_not_detecting_the_correc.xml new file mode 120000 index 0000000..263b55e --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3490_The_DirectWriteRolloverStrategy_was_not_detecting_the_correc.xml @@ -0,0 +1 @@ +../../2-imported/2.18.0/LOG4J2-3490_The_DirectWriteRolloverStrategy_was_not_detecting_the_correc.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3527_Don_t_use_Paths_get_to_avoid_circular_file_systems.xml b/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3527_Don_t_use_Paths_get_to_avoid_circular_file_systems.xml new file mode 120000 index 0000000..a3fd710 --- /dev/null +++ b/log4j-changelog/src/test/resources/3-enriched/2.18.0/LOG4J2-3527_Don_t_use_Paths_get_to_avoid_circular_file_systems.xml @@ -0,0 +1 @@ +../../2-imported/2.18.0/LOG4J2-3527_Don_t_use_Paths_get_to_avoid_circular_file_systems.xml \ No newline at end of file diff --git a/log4j-changelog/src/test/resources/4-exported/2.17.2.adoc b/log4j-changelog/src/test/resources/4-exported/2.17.2.adoc new file mode 100644 index 0000000..3a98b1c --- /dev/null +++ b/log4j-changelog/src/test/resources/4-exported/2.17.2.adoc @@ -0,0 +1,56 @@ +//// + 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 + + https://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. +//// + += 2.17.2 (2022-02-23) + +This release contains the changes noted below: + +* Over 50 improvements and fixes to the Log4j 1.x support. +Continued testing has shown it is a suitable replacement for Log4j 1.x in most cases. +* Scripting now requires a system property be specified naming the languages the user wishes to allow. +The scripting engine will not load if the property isn't set. +* By default, the only remote protocol allowed for loading configuration files is HTTPS. +Users can specify a system property to allow others or prevent remote loading entirely. +* Variable resolution has been modified so that only properties defined as properties in the configuration file can be recursive. +All other Lookups are now non-recursive. +This addresses issues users were having resolving lookups specified in property definitions for use in the `RoutingAppender` and `RollingFileAppender` due to restrictions put in place in 2.17.1. +* Many other fixes and improvements. + +Due to a break in compatibility in the SLF4J binding, Log4j now ships with two versions of the SLF4J to Log4j adapters. +`log4j-slf4j-impl` should be used with SLF4J 1.7.x and earlier and `log4j-slf4j18-impl` should be used with SLF4J 1.8.x and later. +SLF4J-2.0.0 alpha releases are not fully supported. +See https://issues.apache.org/jira/browse/LOG4J2-2975[LOG4J2-2975] and https://jira.qos.ch/browse/SLF4J-511[SLF4J-511]. + +The Log4j 2.17.2 API, as well as many core components, maintains binary compatibility with previous releases. + +Apache Log4j 2.17.2 requires a minimum of Java 8 to build and run. +Log4j 2.12.4 is the last release to support Java 7. +Log4j 2.3.2 is the last release to support Java 6. +Java 6 and Java 7 are no longer supported by the Log4j team. + +For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, or suggestions for improvement, see http://logging.apache.org/log4j/2.x/[the Apache Log4j 2 website]. + +== Changes + +== Removed + +* Fix `ThreadContextDataInjector` initialization deadlock (for https://issues.apache.org/jira/browse/LOG4J2-3333[LOG4J2-3333] by Carter Kozak) +* Document that the Spring Boot Lookup requires the `log4j-spring-boot` dependency (for https://issues.apache.org/jira/browse/LOG4J2-3405[LOG4J2-3405] by Ralph Goers) + +== Fixed + +* Flag `LogManager` as initialized if the `LoggerFactory` is provided as a property (for https://issues.apache.org/jira/browse/LOG4J2-3304[LOG4J2-3304] by Ralph Goers, francis-FY) diff --git a/log4j-changelog/src/test/resources/4-exported/2.18.0.adoc b/log4j-changelog/src/test/resources/4-exported/2.18.0.adoc new file mode 100644 index 0000000..2342565 --- /dev/null +++ b/log4j-changelog/src/test/resources/4-exported/2.18.0.adoc @@ -0,0 +1,48 @@ +//// + 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 + + https://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. +//// + += 2.18.0 (2022-06-28) + +This release primarily contains bug fixes and minor enhancements. + +Due to a break in compatibility in the SLF4J binding, Log4j now ships with two versions of the SLF4J to Log4j adapters. +`log4j-slf4j-impl` should be used with SLF4J 1.7.x and earlier and `log4j-slf4j18-impl` should be used with SLF4J 1.8.x and later. +SLF4J-2.0.0 alpha releases are not fully supported. +See https://issues.apache.org/jira/browse/LOG4J2-2975[LOG4J2-2975] and https://jira.qos.ch/browse/SLF4J-511[SLF4J-511]. + +The Log4j 2.18.0 API, as well as many core components, maintains binary compatibility with previous releases. + +Apache Log4j 2.18.0 requires a minimum of Java 8 to build and run. +Log4j 2.12.4 is the last release to support Java 7. +Log4j 2.3.2 is the last release to support Java 6. +Java 6 and Java 7 are no longer supported by the Log4j team. + +For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, or suggestions for improvement, see http://logging.apache.org/log4j/2.x/[the Apache Log4j 2 website]. + +== Changes + +== Added + +* Don't use `Paths.get()` to avoid circular file systems (for https://issues.apache.org/jira/browse/LOG4J2-3527[LOG4J2-3527] by Ralph Goers) + +== Removed + +* The `DirectWriteRolloverStrategy` was not detecting the correct index to use during startup (for https://issues.apache.org/jira/browse/LOG4J2-3490[LOG4J2-3490] by Ralph Goers) + +== Fixed + +* `DirectWriteRolloverStrategy` should use the current time when creating files (for https://issues.apache.org/jira/browse/LOG4J2-3339[LOG4J2-3339] by Ralph Goers) diff --git a/log4j-changelog/src/test/resources/4-exported/2.x.x.adoc b/log4j-changelog/src/test/resources/4-exported/2.x.x.adoc new file mode 100644 index 0000000..04eed2a --- /dev/null +++ b/log4j-changelog/src/test/resources/4-exported/2.x.x.adoc @@ -0,0 +1,31 @@ +//// + 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 + + https://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. +//// + += 2.x.x + +Changes staged for the next 2.x.x version that is yet to be released. + +== Changes + +== Changed + +* Add `getExplicitLevel` method to `LoggerConfig` (for https://issues.apache.org/jira/browse/LOG4J2-3572[LOG4J2-3572] by Ralph Goers) + +== Fixed + +* Make `StatusConsoleListener` use `SimpleLogger` internally (for https://issues.apache.org/jira/browse/LOG4J2-3584[LOG4J2-3584] by Volkan Yazıcı) +* Harden `InstantFormatter` against delegate failures (for https://issues.apache.org/jira/browse/LOG4J2-3614[LOG4J2-3614] by Volkan Yazıcı, strainu) diff --git a/log4j-changelog/src/test/resources/4-exported/3.x.x.adoc b/log4j-changelog/src/test/resources/4-exported/3.x.x.adoc new file mode 100644 index 0000000..863658c --- /dev/null +++ b/log4j-changelog/src/test/resources/4-exported/3.x.x.adoc @@ -0,0 +1,31 @@ +//// + 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 + + https://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. +//// + += 3.x.x + +Changes staged for the next 3.x.x version that is yet to be released. + +== Changes + +== Added + +* Add `@Ordered` annotation to support plugin ordering when two or more plugins within the same category have the same case-insensitive name (for https://issues.apache.org/jira/browse/LOG4J2-857[LOG4J2-857] by Matt Sicker) + +== Changed + +* Simplify Maven `site` phase and align it with the one in `release-2.x` branch (for https://github.com/apache/logging-log4j2/pull/1220[1220] by Volkan Yazıcı) +* Switch the issue tracker from https://issues.apache.org/jira/browse/LOG4J2[JIRA] to https://github.com/apache/logging-log4j2/issues[GitHub Issues] (for https://github.com/apache/logging-log4j2/pull/1221[1221] by Volkan Yazıcı) diff --git a/log4j-changelog/src/test/resources/4-exported/index.adoc b/log4j-changelog/src/test/resources/4-exported/index.adoc new file mode 100644 index 0000000..a827e27 --- /dev/null +++ b/log4j-changelog/src/test/resources/4-exported/index.adoc @@ -0,0 +1,23 @@ +//// + 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 + + https://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. +//// + += Release changelogs + +* xref:3.x.x.adoc[3.x.x] +* xref:2.x.x.adoc[2.x.x] +* xref:2.18.0.adoc[2.18.0] (2022-06-28) +* xref:2.17.2.adoc[2.17.2] (2022-02-23)
