You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2023/10/24 06:40:04 UTC
[logging-log4j2] branch 2.x updated (3e3cce1d26 -> 1bc8dd0a1c)
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a change to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
from 3e3cce1d26 Update `org.mongodb:bson` to version `4.11.0` (#1893)
new bf2acb54c8 Ban dependencies interfering with our tests
new 49bc13eca5 Fix JCL to Log4j API bridge
new 2f91544134 Re-enable some dependencies
new 5d928e5742 Trigger build
new f36764b1ba Set version to `2.21.1`
new fbc003af2a Release changelog for version `2.21.1`
new 2376c93b8a Improve release notes
new 15421bf42a Release changelog for version `2.21.1`
new 1bc8dd0a1c Bump revision to `2.21.2-SNAPSHOT`
The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
log4j-cassandra/pom.xml | 10 ----
log4j-core-its/pom.xml | 41 ++++++++++---
log4j-core-test/pom.xml | 17 ++----
log4j-jakarta-web/pom.xml | 7 ++-
log4j-jcl/pom.xml | 8 +--
.../services/org.apache.commons.logging.LogFactory | 12 ++++
.../logging/log4j/jcl/CallerInformationTest.java | 39 ++++++-------
.../org/apache/logging/log4j/jcl/LoggerTest.java | 38 ++++++------
.../logging/log4j/jcl/CallerInformationTest.xml | 37 ++++++------
.../apache/logging/log4j/jcl/LoggerTest.xml} | 0
log4j-osgi-test/pom.xml | 27 +++++++--
log4j-parent/pom.xml | 67 ++++++++++++++++++++++
log4j-perf-test/pom.xml | 24 +++++++-
log4j-spring-boot/pom.xml | 6 ++
log4j-taglib/pom.xml | 12 +++-
log4j-to-slf4j/pom.xml | 26 +++++++++
log4j-web/pom.xml | 12 +++-
pom.xml | 3 +-
.../{2.21.0 => 2.21.1}/.release-notes.adoc.ftl | 20 +------
src/changelog/{2.21.0 => 2.21.1}/.release.xml | 2 +-
.../1865_fix_apache_commons_logging.xml} | 6 +-
src/site/_constants.adoc | 2 +-
src/site/_release-notes.adoc | 1 +
src/site/_release-notes/_2.21.1.adoc | 35 +++++++++++
24 files changed, 329 insertions(+), 123 deletions(-)
create mode 100644 log4j-jcl/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory
copy log4j-core-test/src/test/resources/log4j-comp-logger-root.xml => log4j-jcl/src/test/resources/org/apache/logging/log4j/jcl/CallerInformationTest.xml (60%)
rename log4j-jcl/src/test/resources/{log4j-test1.xml => org/apache/logging/log4j/jcl/LoggerTest.xml} (100%)
copy src/changelog/{2.21.0 => 2.21.1}/.release-notes.adoc.ftl (54%)
copy src/changelog/{2.21.0 => 2.21.1}/.release.xml (96%)
copy src/changelog/{2.21.0/1783_spring_arbiter_without_environment.xml => 2.21.1/1865_fix_apache_commons_logging.xml} (85%)
create mode 100644 src/site/_release-notes/_2.21.1.adoc
[logging-log4j2] 06/09: Release changelog for version `2.21.1`
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit fbc003af2aac9ea9a6394d971f2f16760ae95ed2
Author: ASF Logging Services RM <pr...@logging.apache.org>
AuthorDate: Fri Oct 20 18:49:28 2023 +0000
Release changelog for version `2.21.1`
---
.../2.21.1/.release-notes.adoc.ftl} | 28 ++++------------------
.../.release.xml} | 14 ++++-------
.../1865_fix_apache_commons_logging.xml | 0
src/site/_constants.adoc | 2 +-
src/site/_release-notes.adoc | 1 +
.../_release-notes/{_2.x.x.adoc => _2.21.1.adoc} | 23 +++---------------
src/site/_release-notes/_2.x.x.adoc | 4 ----
7 files changed, 13 insertions(+), 59 deletions(-)
diff --git a/src/site/_release-notes/_2.x.x.adoc b/src/changelog/2.21.1/.release-notes.adoc.ftl
similarity index 56%
copy from src/site/_release-notes/_2.x.x.adoc
copy to src/changelog/2.21.1/.release-notes.adoc.ftl
index 06929c7988..4bef52a4a9 100644
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/changelog/2.21.1/.release-notes.adoc.ftl
@@ -15,10 +15,10 @@
limitations under the License.
////
-[#release-notes-2-x-x]
-== 2.x.x
-
+[#release-notes-${release.version?replace("[^a-zA-Z0-9]", "-", "r")}]
+== ${release.version}
+<#if release.date?has_content>Release date:: ${release.date}</#if>
This release primarily focuses on enhancements to our OSGi and JPMS support and contains several bug fixes.
It will be the first release built and signed by the CI using the https://keyserver.ubuntu.com/pks/lookup?search=077E8893A6DCC33DD4A4D5B256E73BA9A0B592D0&op=index[ASF Logging Services Release Manager GPG key], which is shared in https://www.apache.org/dist/logging/KEYS[KEYS].
@@ -43,24 +43,4 @@ All packages marked as private in the Javadoc are not exported.
The module name of four bridges (`log4j-slf4j-impl`, `log4j-slf4j2-impl`, `log4j-to-jul` and `log4j-to-slf4j`) have been changed to adhere to the same convention as the OSGi bundle names.
-
-=== Changed
-
-* Fix `NotSerializableException` when `Logger` is serialized with a `ReusableMessageFactory`. (https://github.com/apache/logging-log4j2/issues/1884[1884])
-* Update `actions/checkout` to version `4.1.1` (https://github.com/apache/logging-log4j2/pull/1868[1868])
-* Update `co.elastic.clients:elasticsearch-java` to version `8.10.4` (https://github.com/apache/logging-log4j2/pull/1881[1881])
-* Update `com.fasterxml.jackson:jackson-bom` to version `2.15.3` (https://github.com/apache/logging-log4j2/pull/1894[1894])
-* Update `com.google.guava:guava` to version `32.1.3-jre` (https://github.com/apache/logging-log4j2/pull/1875[1875])
-* Update `com.h2database:h2` to version `2.2.224` (https://github.com/apache/logging-log4j2/pull/1880[1880])
-* Update `github/codeql-action` to version `2.22.4` (https://github.com/apache/logging-log4j2/pull/1886[1886])
-* Update `io.netty:netty-bom` to version `4.1.100.Final` (https://github.com/apache/logging-log4j2/pull/1857[1857])
-* Update `net.bytebuddy:byte-buddy` to version `1.14.9` (https://github.com/apache/logging-log4j2/pull/1891[1891])
-* Update `org.mongodb:bson` to version `4.11.0` (https://github.com/apache/logging-log4j2/pull/1893[1893])
-* Update `org.springframework.boot:spring-boot` to version `2.7.17` (https://github.com/apache/logging-log4j2/pull/1874[1874])
-* Update `org.zeromq:jeromq` to version `0.5.4` (https://github.com/apache/logging-log4j2/pull/1878[1878])
-* Update `uk.org.webcompere:system-stubs-core` to version `2.0.3` (https://github.com/apache/logging-log4j2/pull/1892[1892])
-* Update Spring Framework from version 5.3.29 to 5.3.30;
-
-=== Fixed
-
-* Fixes the Apache Commons Logging (JCL) bridge: `log4j-jcl`. (https://github.com/apache/logging-log4j2/issues/1865[1865])
+<#include "../.changelog.adoc.ftl">
diff --git a/src/changelog/.2.x.x/1865_fix_apache_commons_logging.xml b/src/changelog/2.21.1/.release.xml
similarity index 63%
copy from src/changelog/.2.x.x/1865_fix_apache_commons_logging.xml
copy to src/changelog/2.21.1/.release.xml
index 2a180144b5..87adb3c696 100644
--- a/src/changelog/.2.x.x/1865_fix_apache_commons_logging.xml
+++ b/src/changelog/2.21.1/.release.xml
@@ -15,13 +15,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
- type="fixed">
- <issue id="1865" link="https://github.com/apache/logging-log4j2/issues/1865"/>
- <author id="github:ppkarwasz"/>
- <description format="asciidoc">
- Fixes the Apache Commons Logging (JCL) bridge: `log4j-jcl`.
- </description>
-</entry>
+<release 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"
+ date="2023-10-20" version="2.21.1"/>
diff --git a/src/changelog/.2.x.x/1865_fix_apache_commons_logging.xml b/src/changelog/2.21.1/1865_fix_apache_commons_logging.xml
similarity index 100%
rename from src/changelog/.2.x.x/1865_fix_apache_commons_logging.xml
rename to src/changelog/2.21.1/1865_fix_apache_commons_logging.xml
diff --git a/src/site/_constants.adoc b/src/site/_constants.adoc
index bc3768c83f..6463fa3a20 100644
--- a/src/site/_constants.adoc
+++ b/src/site/_constants.adoc
@@ -34,7 +34,7 @@
////
:project-github-url: https://github.com/apache/logging-log4j2
-:project-version: 2.22.0-SNAPSHOT
+:project-version: 2.21.1
:project-name: Log4j
:project-id: log4j
:java-target-version: 8
diff --git a/src/site/_release-notes.adoc b/src/site/_release-notes.adoc
index b2f942c016..089c66dd4e 100644
--- a/src/site/_release-notes.adoc
+++ b/src/site/_release-notes.adoc
@@ -37,6 +37,7 @@
= Release Notes
include::_release-notes/_2.x.x.adoc[]
+include::_release-notes/_2.21.1.adoc[]
include::_release-notes/_2.21.0.adoc[]
include::_release-notes/_2.20.0.adoc[]
include::_release-notes/_2.19.0.adoc[]
diff --git a/src/site/_release-notes/_2.x.x.adoc b/src/site/_release-notes/_2.21.1.adoc
similarity index 59%
copy from src/site/_release-notes/_2.x.x.adoc
copy to src/site/_release-notes/_2.21.1.adoc
index 06929c7988..dbbe7cabfd 100644
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/site/_release-notes/_2.21.1.adoc
@@ -15,10 +15,10 @@
limitations under the License.
////
-[#release-notes-2-x-x]
-== 2.x.x
-
+[#release-notes-2-21-1]
+== 2.21.1
+Release date:: 2023-10-20
This release primarily focuses on enhancements to our OSGi and JPMS support and contains several bug fixes.
It will be the first release built and signed by the CI using the https://keyserver.ubuntu.com/pks/lookup?search=077E8893A6DCC33DD4A4D5B256E73BA9A0B592D0&op=index[ASF Logging Services Release Manager GPG key], which is shared in https://www.apache.org/dist/logging/KEYS[KEYS].
@@ -44,23 +44,6 @@ All packages marked as private in the Javadoc are not exported.
The module name of four bridges (`log4j-slf4j-impl`, `log4j-slf4j2-impl`, `log4j-to-jul` and `log4j-to-slf4j`) have been changed to adhere to the same convention as the OSGi bundle names.
-=== Changed
-
-* Fix `NotSerializableException` when `Logger` is serialized with a `ReusableMessageFactory`. (https://github.com/apache/logging-log4j2/issues/1884[1884])
-* Update `actions/checkout` to version `4.1.1` (https://github.com/apache/logging-log4j2/pull/1868[1868])
-* Update `co.elastic.clients:elasticsearch-java` to version `8.10.4` (https://github.com/apache/logging-log4j2/pull/1881[1881])
-* Update `com.fasterxml.jackson:jackson-bom` to version `2.15.3` (https://github.com/apache/logging-log4j2/pull/1894[1894])
-* Update `com.google.guava:guava` to version `32.1.3-jre` (https://github.com/apache/logging-log4j2/pull/1875[1875])
-* Update `com.h2database:h2` to version `2.2.224` (https://github.com/apache/logging-log4j2/pull/1880[1880])
-* Update `github/codeql-action` to version `2.22.4` (https://github.com/apache/logging-log4j2/pull/1886[1886])
-* Update `io.netty:netty-bom` to version `4.1.100.Final` (https://github.com/apache/logging-log4j2/pull/1857[1857])
-* Update `net.bytebuddy:byte-buddy` to version `1.14.9` (https://github.com/apache/logging-log4j2/pull/1891[1891])
-* Update `org.mongodb:bson` to version `4.11.0` (https://github.com/apache/logging-log4j2/pull/1893[1893])
-* Update `org.springframework.boot:spring-boot` to version `2.7.17` (https://github.com/apache/logging-log4j2/pull/1874[1874])
-* Update `org.zeromq:jeromq` to version `0.5.4` (https://github.com/apache/logging-log4j2/pull/1878[1878])
-* Update `uk.org.webcompere:system-stubs-core` to version `2.0.3` (https://github.com/apache/logging-log4j2/pull/1892[1892])
-* Update Spring Framework from version 5.3.29 to 5.3.30;
-
=== Fixed
* Fixes the Apache Commons Logging (JCL) bridge: `log4j-jcl`. (https://github.com/apache/logging-log4j2/issues/1865[1865])
diff --git a/src/site/_release-notes/_2.x.x.adoc b/src/site/_release-notes/_2.x.x.adoc
index 06929c7988..c6b815797d 100644
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/site/_release-notes/_2.x.x.adoc
@@ -60,7 +60,3 @@ The module name of four bridges (`log4j-slf4j-impl`, `log4j-slf4j2-impl`, `log4j
* Update `org.zeromq:jeromq` to version `0.5.4` (https://github.com/apache/logging-log4j2/pull/1878[1878])
* Update `uk.org.webcompere:system-stubs-core` to version `2.0.3` (https://github.com/apache/logging-log4j2/pull/1892[1892])
* Update Spring Framework from version 5.3.29 to 5.3.30;
-
-=== Fixed
-
-* Fixes the Apache Commons Logging (JCL) bridge: `log4j-jcl`. (https://github.com/apache/logging-log4j2/issues/1865[1865])
[logging-log4j2] 09/09: Bump revision to `2.21.2-SNAPSHOT`
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 1bc8dd0a1c81e96c664c58f6847e4799c268929e
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Tue Oct 24 08:39:18 2023 +0200
Bump revision to `2.21.2-SNAPSHOT`
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index fc7762e67a..bb77886af5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -304,7 +304,7 @@
<properties>
<!-- project version -->
- <revision>2.21.1</revision>
+ <revision>2.21.2-SNAPSHOT</revision>
<!-- =================
Common properties
[logging-log4j2] 05/09: Set version to `2.21.1`
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit f36764b1ba61e3316b3d70a129b32b5745581b56
Author: ASF Logging Services RM <pr...@logging.apache.org>
AuthorDate: Fri Oct 20 18:49:11 2023 +0000
Set version to `2.21.1`
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index addce1305b..ec12344a89 100644
--- a/pom.xml
+++ b/pom.xml
@@ -304,7 +304,7 @@
<properties>
<!-- project version -->
- <revision>2.22.0-SNAPSHOT</revision>
+ <revision>2.21.1</revision>
<!-- =================
Common properties
[logging-log4j2] 02/09: Fix JCL to Log4j API bridge
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 49bc13eca5a07f62333bd1e57f43302925a290d2
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Oct 20 16:22:11 2023 +0200
Fix JCL to Log4j API bridge
---
log4j-jcl/pom.xml | 8 ++---
.../services/org.apache.commons.logging.LogFactory | 12 +++++++
.../logging/log4j/jcl/CallerInformationTest.java | 39 ++++++++++----------
.../org/apache/logging/log4j/jcl/LoggerTest.java | 38 ++++++++++----------
.../logging/log4j/jcl/CallerInformationTest.xml | 42 ++++++++++++++++++++++
.../apache/logging/log4j/jcl/LoggerTest.xml} | 0
.../.2.x.x/1865_fix_apache_commons_logging.xml | 27 ++++++++++++++
src/site/_release-notes/_2.x.x.adoc | 4 +++
8 files changed, 127 insertions(+), 43 deletions(-)
diff --git a/log4j-jcl/pom.xml b/log4j-jcl/pom.xml
index 345e2ad4e2..e178c6aed7 100644
--- a/log4j-jcl/pom.xml
+++ b/log4j-jcl/pom.xml
@@ -60,13 +60,13 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/log4j-jcl/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory b/log4j-jcl/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory
new file mode 100644
index 0000000000..f18955c07b
--- /dev/null
+++ b/log4j-jcl/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory
@@ -0,0 +1,12 @@
+org.apache.logging.log4j.jcl.LogFactoryImpl
+###
+# ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ ██
+# ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██
+# ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██
+# ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
+# ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ ██
+#
+# Apache Commons Logging 1.2 does **not** use the `ServiceLoader` class.
+# It reads the first line of this file and expects it to be a FQCN.
+#
+# cf. https://github.com/apache/logging-log4j2/issues/1865
diff --git a/log4j-jcl/src/test/java/org/apache/logging/log4j/jcl/CallerInformationTest.java b/log4j-jcl/src/test/java/org/apache/logging/log4j/jcl/CallerInformationTest.java
index 22cb7a75b6..e1f2d7b59d 100644
--- a/log4j-jcl/src/test/java/org/apache/logging/log4j/jcl/CallerInformationTest.java
+++ b/log4j-jcl/src/test/java/org/apache/logging/log4j/jcl/CallerInformationTest.java
@@ -20,38 +20,38 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.test.appender.ListAppender;
-import org.apache.logging.log4j.core.test.junit.LoggerContextRule;
-import org.junit.ClassRule;
-import org.junit.Test;
+import org.apache.logging.log4j.test.junit.SetTestProperty;
+import org.apache.logging.log4j.test.junit.UsingStatusListener;
+import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertEquals;
+import static org.assertj.core.api.Assertions.assertThat;
+@UsingStatusListener
+@SetTestProperty(key ="log4j2.configurationFile", value="org/apache/logging/log4j/jcl/CallerInformationTest.xml")
public class CallerInformationTest {
- // config from log4j-core test-jar
- private static final String CONFIG = "log4j2-calling-class.xml";
-
- @ClassRule
- public static final LoggerContextRule ctx = new LoggerContextRule(CONFIG);
-
@Test
public void testClassLogger() throws Exception {
- final ListAppender app = ctx.getListAppender("Class").clear();
+ final LoggerContext ctx = LoggerContext.getContext(false);
+ final ListAppender app = ctx.getConfiguration().getAppender("Class");
+ app.clear();
final Log logger = LogFactory.getLog("ClassLogger");
logger.info("Ignored message contents.");
logger.warn("Verifying the caller class is still correct.");
logger.error("Hopefully nobody breaks me!");
final List<String> messages = app.getMessages();
- assertEquals("Incorrect number of messages.", 3, messages.size());
- for (final String message : messages) {
- assertEquals("Incorrect caller class name.", this.getClass().getName(), message);
- }
+ assertThat(messages)
+ .hasSize(3)
+ .allMatch(c -> getClass().getName().equals(c));
}
@Test
public void testMethodLogger() throws Exception {
- final ListAppender app = ctx.getListAppender("Method").clear();
+ final LoggerContext ctx = LoggerContext.getContext(false);
+ final ListAppender app = ctx.getConfiguration().getAppender("Method");
+ app.clear();
final Log logger = LogFactory.getLog("MethodLogger");
logger.info("More messages.");
logger.warn("CATASTROPHE INCOMING!");
@@ -59,9 +59,8 @@ public class CallerInformationTest {
logger.warn("brains~~~");
logger.info("Itchy. Tasty.");
final List<String> messages = app.getMessages();
- assertEquals("Incorrect number of messages.", 5, messages.size());
- for (final String message : messages) {
- assertEquals("Incorrect caller method name.", "testMethodLogger", message);
- }
+ assertThat(messages)
+ .hasSize(5)
+ .allMatch("testMethodLogger"::equals);
}
}
diff --git a/log4j-jcl/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java b/log4j-jcl/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java
index a41d60e430..c26a16cd07 100644
--- a/log4j-jcl/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java
+++ b/log4j-jcl/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java
@@ -20,28 +20,27 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.test.appender.ListAppender;
-import org.apache.logging.log4j.core.test.junit.LoggerContextRule;
+import org.apache.logging.log4j.test.junit.SetTestProperty;
+import org.apache.logging.log4j.test.junit.UsingStatusListener;
import org.apache.logging.log4j.util.Strings;
-import org.junit.ClassRule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasSize;
-import static org.junit.Assert.*;
+import static org.assertj.core.api.Assertions.assertThat;
-/**
- *
- */
-public class LoggerTest {
-
- private static final String CONFIG = "log4j-test1.xml";
+@UsingStatusListener
+@SetTestProperty(key ="log4j2.configurationFile", value="org/apache/logging/log4j/jcl/LoggerTest.xml")
+class LoggerTest {
- @ClassRule
- public static final LoggerContextRule context = new LoggerContextRule(CONFIG);
+ @Test
+ void testFactory() {
+ final LogFactory factory = LogFactory.getFactory();
+ assertThat(factory).isInstanceOf(LogFactoryImpl.class);
+ }
@Test
- public void testLog() {
+ void testLog() {
final Log logger = LogFactory.getLog("LoggerTest");
logger.debug("Test message");
verify("List", "o.a.l.l.j.LoggerTest Test message MDC{}" + Strings.LINE_SEPARATOR);
@@ -54,11 +53,12 @@ public class LoggerTest {
}
private void verify(final String name, final String expected) {
- final ListAppender listApp = context.getListAppender(name);
+ final LoggerContext context = LoggerContext.getContext(false);
+ final ListAppender listApp = context.getConfiguration().getAppender(name);
final List<String> events = listApp.getMessages();
- assertThat(events, hasSize(1));
- final String actual = events.get(0);
- assertThat(actual, equalTo(expected));
+ assertThat(events)
+ .hasSize(1)
+ .containsExactly(expected);
listApp.clear();
}
diff --git a/log4j-jcl/src/test/resources/org/apache/logging/log4j/jcl/CallerInformationTest.xml b/log4j-jcl/src/test/resources/org/apache/logging/log4j/jcl/CallerInformationTest.xml
new file mode 100644
index 0000000000..997aaa7049
--- /dev/null
+++ b/log4j-jcl/src/test/resources/org/apache/logging/log4j/jcl/CallerInformationTest.xml
@@ -0,0 +1,42 @@
+<?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.
+ -->
+<Configuration name="CallerInformationTest" status="OFF">
+ <Appenders>
+ <List name="Class">
+ <PatternLayout pattern="%class"/>
+ </List>
+ <List name="Method">
+ <PatternLayout pattern="%method"/>
+ </List>
+ <List name="Fqcn">
+ <PatternLayout pattern="%fqcn"/>
+ </List>
+ </Appenders>
+ <Loggers>
+ <Logger name="ClassLogger" level="info">
+ <AppenderRef ref="Class"/>
+ </Logger>
+ <Logger name="MethodLogger" level="info">
+ <AppenderRef ref="Method"/>
+ </Logger>
+ <Logger name="FqcnLogger" level="info">
+ <AppenderRef ref="Fqcn"/>
+ </Logger>
+ <Root level="off"/>
+ </Loggers>
+</Configuration>
diff --git a/log4j-jcl/src/test/resources/log4j-test1.xml b/log4j-jcl/src/test/resources/org/apache/logging/log4j/jcl/LoggerTest.xml
similarity index 100%
rename from log4j-jcl/src/test/resources/log4j-test1.xml
rename to log4j-jcl/src/test/resources/org/apache/logging/log4j/jcl/LoggerTest.xml
diff --git a/src/changelog/.2.x.x/1865_fix_apache_commons_logging.xml b/src/changelog/.2.x.x/1865_fix_apache_commons_logging.xml
new file mode 100644
index 0000000000..2a180144b5
--- /dev/null
+++ b/src/changelog/.2.x.x/1865_fix_apache_commons_logging.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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
+ type="fixed">
+ <issue id="1865" link="https://github.com/apache/logging-log4j2/issues/1865"/>
+ <author id="github:ppkarwasz"/>
+ <description format="asciidoc">
+ Fixes the Apache Commons Logging (JCL) bridge: `log4j-jcl`.
+ </description>
+</entry>
diff --git a/src/site/_release-notes/_2.x.x.adoc b/src/site/_release-notes/_2.x.x.adoc
index c6b815797d..06929c7988 100644
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/site/_release-notes/_2.x.x.adoc
@@ -60,3 +60,7 @@ The module name of four bridges (`log4j-slf4j-impl`, `log4j-slf4j2-impl`, `log4j
* Update `org.zeromq:jeromq` to version `0.5.4` (https://github.com/apache/logging-log4j2/pull/1878[1878])
* Update `uk.org.webcompere:system-stubs-core` to version `2.0.3` (https://github.com/apache/logging-log4j2/pull/1892[1892])
* Update Spring Framework from version 5.3.29 to 5.3.30;
+
+=== Fixed
+
+* Fixes the Apache Commons Logging (JCL) bridge: `log4j-jcl`. (https://github.com/apache/logging-log4j2/issues/1865[1865])
[logging-log4j2] 07/09: Improve release notes
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 2376c93b8a3c8d054bd82175e303daacce5fe67e
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Oct 20 21:05:20 2023 +0200
Improve release notes
---
pom.xml | 2 +-
src/changelog/2.21.1/.release-notes.adoc.ftl | 20 +++-----------------
2 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/pom.xml b/pom.xml
index ec12344a89..fc7762e67a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -319,7 +319,7 @@
<module.name />
<!-- TODO: fix errors and re-enable SpotBugs -->
<spotbugs.skip>true</spotbugs.skip>
- <project.build.outputTimestamp>2023-10-23T20:13:28+02:00</project.build.outputTimestamp>
+ <project.build.outputTimestamp>2023-10-23T19:03:40Z</project.build.outputTimestamp>
<!-- ========================
Site-specific properties
diff --git a/src/changelog/2.21.1/.release-notes.adoc.ftl b/src/changelog/2.21.1/.release-notes.adoc.ftl
index 4bef52a4a9..17eeb14023 100644
--- a/src/changelog/2.21.1/.release-notes.adoc.ftl
+++ b/src/changelog/2.21.1/.release-notes.adoc.ftl
@@ -20,27 +20,13 @@
<#if release.date?has_content>Release date:: ${release.date}</#if>
-This release primarily focuses on enhancements to our OSGi and JPMS support and contains several bug fixes.
-It will be the first release built and signed by the CI using the https://keyserver.ubuntu.com/pks/lookup?search=077E8893A6DCC33DD4A4D5B256E73BA9A0B592D0&op=index[ASF Logging Services Release Manager GPG key], which is shared in https://www.apache.org/dist/logging/KEYS[KEYS].
+This patch release contains only the fix of a `log4j-jcl` bug that prevents it from connecting with `commons-logging`.
-The Log4j 2.21.0 API, as well as the other artifacts, maintains binary compatibility with the previous release.
+The Log4j 2.21.1 API, as well as the other artifacts, maintains binary compatibility with the previous release.
-Apache Log4j 2.21.0 requires Java 8 to run.
+Apache Log4j 2.21.1 requires Java 8 to run.
The build requires JDK 11 and generates reproducible binaries.
For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, get support, or suggestions for improvement, see http://logging.apache.org/log4j/2.x/[the Apache Log4j 2 website].
-=== OSGi changes
-
-All the published artifacts are OSGi bundles or fragments.
-
-This release introduces a change in the bundle symbolic names to allow them to function as JPMS module name: all hyphens `-` present in the bundle names of previous releases were replaced by dots `.`.
-
-=== JPMS changes
-
-All the published artifacts have been migrated from automatic modules to named JPMS modules.
-All packages marked as private in the Javadoc are not exported.
-
-The module name of four bridges (`log4j-slf4j-impl`, `log4j-slf4j2-impl`, `log4j-to-jul` and `log4j-to-slf4j`) have been changed to adhere to the same convention as the OSGi bundle names.
-
<#include "../.changelog.adoc.ftl">
[logging-log4j2] 04/09: Trigger build
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 5d928e5742a55c554727278f1477f96d159f4e14
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Oct 20 20:14:21 2023 +0200
Trigger build
---
pom.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pom.xml b/pom.xml
index 99680751c7..addce1305b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -319,6 +319,7 @@
<module.name />
<!-- TODO: fix errors and re-enable SpotBugs -->
<spotbugs.skip>true</spotbugs.skip>
+ <project.build.outputTimestamp>2023-10-23T20:13:28+02:00</project.build.outputTimestamp>
<!-- ========================
Site-specific properties
[logging-log4j2] 01/09: Ban dependencies interfering with our tests
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit bf2acb54c8d81eced7948818c934d2e88e604676
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Oct 20 16:02:00 2023 +0200
Ban dependencies interfering with our tests
---
log4j-cassandra/pom.xml | 10 -------
log4j-core-its/pom.xml | 18 +++++--------
log4j-core-test/pom.xml | 17 +++++-------
log4j-jakarta-web/pom.xml | 7 ++++-
log4j-osgi-test/pom.xml | 10 -------
log4j-parent/pom.xml | 67 +++++++++++++++++++++++++++++++++++++++++++++++
log4j-perf-test/pom.xml | 24 +++++++++++++++--
log4j-spring-boot/pom.xml | 6 +++++
log4j-taglib/pom.xml | 7 ++++-
log4j-to-slf4j/pom.xml | 26 ++++++++++++++++++
log4j-web/pom.xml | 7 ++++-
11 files changed, 151 insertions(+), 48 deletions(-)
diff --git a/log4j-cassandra/pom.xml b/log4j-cassandra/pom.xml
index 24016c467f..3c0302e547 100644
--- a/log4j-cassandra/pom.xml
+++ b/log4j-cassandra/pom.xml
@@ -86,16 +86,6 @@
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </exclusion>
- <exclusion>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
diff --git a/log4j-core-its/pom.xml b/log4j-core-its/pom.xml
index 963cd8ed1d..e594926512 100644
--- a/log4j-core-its/pom.xml
+++ b/log4j-core-its/pom.xml
@@ -153,17 +153,6 @@
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- Logback performance tests -->
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <scope>test</scope>
- </dependency>
<!-- SLF4J tests -->
<dependency>
<groupId>org.slf4j</groupId>
@@ -179,7 +168,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
- <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jcl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
<build>
diff --git a/log4j-core-test/pom.xml b/log4j-core-test/pom.xml
index d73a6a6864..89fae5cdfd 100644
--- a/log4j-core-test/pom.xml
+++ b/log4j-core-test/pom.xml
@@ -108,6 +108,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jcl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- JNDI and JMS tests -->
<dependency>
@@ -278,17 +284,6 @@
<artifactId>kafka-clients</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- Logback performance tests -->
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
diff --git a/log4j-jakarta-web/pom.xml b/log4j-jakarta-web/pom.xml
index 84c90d9877..5a14417e22 100644
--- a/log4j-jakarta-web/pom.xml
+++ b/log4j-jakarta-web/pom.xml
@@ -82,7 +82,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
- <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jcl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
diff --git a/log4j-osgi-test/pom.xml b/log4j-osgi-test/pom.xml
index f043135c7e..940e1f2225 100644
--- a/log4j-osgi-test/pom.xml
+++ b/log4j-osgi-test/pom.xml
@@ -86,16 +86,6 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index 0db26b4fec..3a55df64c3 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -326,6 +326,24 @@
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>${cassandra.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>log4j-over-slf4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -338,6 +356,16 @@
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-thrift</artifactId>
<version>${cassandra.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>log4j-over-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -1083,6 +1111,45 @@
</plugins>
</pluginManagement>
+
+ <plugins>
+ <!--
+ ~ Some external logging bridges can interfere with our tests, giving false negatives.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ban-logging-dependencies</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <bannedDependencies>
+ <excludes>
+ <!-- JCL replacements -->
+ <exclude>org.slf4j:jcl-over-slf4j</exclude>
+ <exclude>org.springframework:spring-jcl</exclude>
+ <!-- Log4j 1.x replacements -->
+ <exclude>org.slf4j:log4j-over-slf4j</exclude>
+ <exclude>ch.qos.reload4j:reload4j</exclude>
+ <!-- Bridges to Log4j 1.x -->
+ <exclude>org.slf4j:slf4j-log4j12</exclude>
+ <exclude>org.slf4j:slf4j-reload4j</exclude>
+ <!-- PAX Logging just to be safe -->
+ <exclude>org.ops4j.pax.logging:*</exclude>
+ <!-- Logback -->
+ <exclude>ch.qos.logback:*</exclude>
+ </excludes>
+ </bannedDependencies>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
</project>
diff --git a/log4j-perf-test/pom.xml b/log4j-perf-test/pom.xml
index 200cbe069e..2717fb5a90 100644
--- a/log4j-perf-test/pom.xml
+++ b/log4j-perf-test/pom.xml
@@ -120,12 +120,10 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
- <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
@@ -144,6 +142,28 @@
<build>
<plugins>
+ <!--
+ ~ Unban Logback.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ban-logging-dependencies</id>
+ <configuration>
+ <rules>
+ <bannedDependencies>
+ <includes>
+ <include>ch.qos.logback:*</include>
+ </includes>
+ </bannedDependencies>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
diff --git a/log4j-spring-boot/pom.xml b/log4j-spring-boot/pom.xml
index ca58823008..bc787a8bad 100644
--- a/log4j-spring-boot/pom.xml
+++ b/log4j-spring-boot/pom.xml
@@ -54,6 +54,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jcl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
diff --git a/log4j-taglib/pom.xml b/log4j-taglib/pom.xml
index 509338bad3..27efe28819 100644
--- a/log4j-taglib/pom.xml
+++ b/log4j-taglib/pom.xml
@@ -84,7 +84,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
- <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jcl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
</project>
diff --git a/log4j-to-slf4j/pom.xml b/log4j-to-slf4j/pom.xml
index 2ea30e826e..cf5de792ce 100644
--- a/log4j-to-slf4j/pom.xml
+++ b/log4j-to-slf4j/pom.xml
@@ -96,4 +96,30 @@
<scope>test</scope>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <!--
+ ~ Unban Logback.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ban-logging-dependencies</id>
+ <configuration>
+ <rules>
+ <bannedDependencies>
+ <includes>
+ <include>ch.qos.logback:*:*:*:test</include>
+ </includes>
+ </bannedDependencies>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/log4j-web/pom.xml b/log4j-web/pom.xml
index 9a7f00c906..331bb0462f 100644
--- a/log4j-web/pom.xml
+++ b/log4j-web/pom.xml
@@ -86,7 +86,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
- <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jcl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
[logging-log4j2] 03/09: Re-enable some dependencies
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 2f9154413439d4c5e9e9bf82d5717e64c93f6827
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Oct 20 17:43:49 2023 +0200
Re-enable some dependencies
---
log4j-core-its/pom.xml | 33 +++++++++++++++++++++++++++++++++
log4j-osgi-test/pom.xml | 27 +++++++++++++++++++++++++++
log4j-taglib/pom.xml | 5 +++++
log4j-web/pom.xml | 5 +++++
4 files changed, 70 insertions(+)
diff --git a/log4j-core-its/pom.xml b/log4j-core-its/pom.xml
index e594926512..a0aa5ce922 100644
--- a/log4j-core-its/pom.xml
+++ b/log4j-core-its/pom.xml
@@ -153,6 +153,12 @@
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
+ <!-- Logback performance tests -->
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>test</scope>
+ </dependency>
<!-- SLF4J tests -->
<dependency>
<groupId>org.slf4j</groupId>
@@ -178,6 +184,29 @@
</dependencies>
<build>
<plugins>
+
+ <!--
+ ~ Unban Logback.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ban-logging-dependencies</id>
+ <configuration>
+ <rules>
+ <bannedDependencies>
+ <includes>
+ <include>ch.qos.logback:*:*:*:test</include>
+ </includes>
+ </bannedDependencies>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
@@ -195,6 +224,7 @@
org.apache.logging.log4j.categories.Appenders$Jms</groups>
</configuration>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@@ -213,6 +243,7 @@
</execution>
</executions>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@@ -234,12 +265,14 @@
</execution>
</executions>
</plugin>
+
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
+
</plugins>
</build>
</project>
diff --git a/log4j-osgi-test/pom.xml b/log4j-osgi-test/pom.xml
index 940e1f2225..681ac04d0a 100644
--- a/log4j-osgi-test/pom.xml
+++ b/log4j-osgi-test/pom.xml
@@ -86,6 +86,11 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
@@ -125,6 +130,28 @@
<build>
<plugins>
+ <!--
+ ~ Unban Logback.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ban-logging-dependencies</id>
+ <configuration>
+ <rules>
+ <bannedDependencies>
+ <includes>
+ <include>ch.qos.logback:*:*:*:test</include>
+ </includes>
+ </bannedDependencies>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>exam-maven-plugin</artifactId>
diff --git a/log4j-taglib/pom.xml b/log4j-taglib/pom.xml
index 27efe28819..cee102f292 100644
--- a/log4j-taglib/pom.xml
+++ b/log4j-taglib/pom.xml
@@ -71,6 +71,11 @@
<artifactId>log4j-core-test</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
diff --git a/log4j-web/pom.xml b/log4j-web/pom.xml
index 331bb0462f..7b27f3853d 100644
--- a/log4j-web/pom.xml
+++ b/log4j-web/pom.xml
@@ -63,6 +63,11 @@
<artifactId>log4j-core-test</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
[logging-log4j2] 08/09: Release changelog for version `2.21.1`
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 15421bf42ac227bf4532086b052a3f03d0a6fe4b
Author: ASF Logging Services RM <pr...@logging.apache.org>
AuthorDate: Fri Oct 20 19:43:00 2023 +0000
Release changelog for version `2.21.1`
---
src/site/_release-notes/_2.21.1.adoc | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/src/site/_release-notes/_2.21.1.adoc b/src/site/_release-notes/_2.21.1.adoc
index dbbe7cabfd..76c8ec71bf 100644
--- a/src/site/_release-notes/_2.21.1.adoc
+++ b/src/site/_release-notes/_2.21.1.adoc
@@ -20,29 +20,15 @@
Release date:: 2023-10-20
-This release primarily focuses on enhancements to our OSGi and JPMS support and contains several bug fixes.
-It will be the first release built and signed by the CI using the https://keyserver.ubuntu.com/pks/lookup?search=077E8893A6DCC33DD4A4D5B256E73BA9A0B592D0&op=index[ASF Logging Services Release Manager GPG key], which is shared in https://www.apache.org/dist/logging/KEYS[KEYS].
+This patch release contains only the fix of a `log4j-jcl` bug that prevents it from connecting with `commons-logging`.
-The Log4j 2.21.0 API, as well as the other artifacts, maintains binary compatibility with the previous release.
+The Log4j 2.21.1 API, as well as the other artifacts, maintains binary compatibility with the previous release.
-Apache Log4j 2.21.0 requires Java 8 to run.
+Apache Log4j 2.21.1 requires Java 8 to run.
The build requires JDK 11 and generates reproducible binaries.
For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, get support, or suggestions for improvement, see http://logging.apache.org/log4j/2.x/[the Apache Log4j 2 website].
-=== OSGi changes
-
-All the published artifacts are OSGi bundles or fragments.
-
-This release introduces a change in the bundle symbolic names to allow them to function as JPMS module name: all hyphens `-` present in the bundle names of previous releases were replaced by dots `.`.
-
-=== JPMS changes
-
-All the published artifacts have been migrated from automatic modules to named JPMS modules.
-All packages marked as private in the Javadoc are not exported.
-
-The module name of four bridges (`log4j-slf4j-impl`, `log4j-slf4j2-impl`, `log4j-to-jul` and `log4j-to-slf4j`) have been changed to adhere to the same convention as the OSGi bundle names.
-
=== Fixed