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
The following commit(s) were added to refs/heads/2.x by this push:
new fdf38b1eb0 Fix `log4j-to-slf4j` JPMS and OSGi descriptors
fdf38b1eb0 is described below
commit fdf38b1eb0e55e310b017600db873e2be56f5187
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Tue Nov 21 20:16:45 2023 +0100
Fix `log4j-to-slf4j` JPMS and OSGi descriptors
Due to the upgrade from SLF4J 1.7.x to 2.x, the JPMS and OSGi
descriptors of `log4j-to-slf4j` suffer from these shortcomings:
* the JPMS descriptor uses a filebased `slf4j-api` module name (instead
of `org.slf4j`,
* the OSGi descriptor accepts a restricted range of SLF4J versions: [2,
3). Since `slf4j-api` 2.x is technically just a minor version update
of `slf4j-api` 1.7.x, we should use an extended range of [1.7, 3).
Closes #1983.
---
log4j-to-slf4j/pom.xml | 9 +++++++--
src/changelog/.2.x.x/fix_log4j_to_slf4j_descriptor.xml | 10 ++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/log4j-to-slf4j/pom.xml b/log4j-to-slf4j/pom.xml
index 9ba0080bd5..24f9d42100 100644
--- a/log4j-to-slf4j/pom.xml
+++ b/log4j-to-slf4j/pom.xml
@@ -32,11 +32,16 @@
<!--
~ OSGi and JPMS options
-->
- <slf4j.support.bound>3</slf4j.support.bound>
+ <slf4j.support.range>[1.7,3)</slf4j.support.range>
<bnd-extra-package-options>
<!-- This bridge also support SLF4J 2.x -->
- org.slf4j.*;version="${range;[==,${slf4j.support.bound})}"
+ org.slf4j.*;version="${slf4j.support.range}"
</bnd-extra-package-options>
+ <bnd-extra-module-options>
+ <!-- The module descriptor is in `META-INF/versions/9`
+ BND 6.x can not find it -->
+ org.slf4j;substitute="slf4j-api"
+ </bnd-extra-module-options>
</properties>
<dependencies>
<dependency>
diff --git a/src/changelog/.2.x.x/fix_log4j_to_slf4j_descriptor.xml
b/src/changelog/.2.x.x/fix_log4j_to_slf4j_descriptor.xml
new file mode 100644
index 0000000000..65243f428a
--- /dev/null
+++ b/src/changelog/.2.x.x/fix_log4j_to_slf4j_descriptor.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.2.xsd"
+ type="fixed">
+ <issue id="1983" link="https://github.com/apache/logging-log4j2/pull/1983"/>
+ <description format="asciidoc">
+ Fix `log4j-to-slf4j` JPMS and OSGi descriptors.
+ </description>
+</entry>