You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Johan Compagner (Jira)" <ji...@apache.org> on 2022/06/28 13:19:00 UTC
[jira] [Created] (LOG4J2-3545) Log4J-JCL should have the same OSGI configuration as Log4j-SLF4J18
| ![](cid:jira-generated-image-avatar-6a1c5251-2387-4ec3-b0aa-d51d65b4bba4) |
[Johan
Compagner](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jcompanger%40gmail.com)
**created** an issue
---|---
|
---
| [Log4j 2](https://issues.apache.org/jira/browse/LOG4J2) /
[![Improvement](cid:jira-generated-image-
avatar-a3e748b4-9ff0-4eaf-b3e4-f803f9dbfe0a)](https://issues.apache.org/jira/browse/LOG4J2-3545)
[LOG4J2-3545](https://issues.apache.org/jira/browse/LOG4J2-3545)
---
[Log4J-JCL should have the same OSGI configuration as
Log4j-SLF4J18](https://issues.apache.org/jira/browse/LOG4J2-3545)
| Issue Type: | ![Improvement](cid:jira-generated-image-
avatar-a3e748b4-9ff0-4eaf-b3e4-f803f9dbfe0a) Improvement
---|---
Affects Versions: | 2.17.2
Assignee: | Unassigned
Components: | JCL Bridge
Created: | 28/Jun/22 13:18
Priority: | ![Major](cid:jira-generated-image-static-major-
fe6dc29a-8ebc-4381-8940-5d9da814b32a) Major
Reporter: | [Johan
Compagner](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jcompanger%40gmail.com)
|
if you look at the manifest in this jar:
<https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jcl/2.17.2/log4j-jcl-2.17.2.jar>
compared to the one that is in here:
<https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-slf4j18-impl/2.17.2/log4j-slf4j18-impl-2.17.2.jar>
then slf4j has the right OSGI manifest entries to work correctly with the
ServiceLoader
SLF4j has:
Require-Capability: osgi.extender;filter:="(osgi.extender=osgi.service
loader.registrar)",osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Provide-Capability: osgi.serviceloader;osgi.serviceloader="org.slf4j.s
pi.SLF4JServiceProvider"
JCL has:
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
this should become to fully support it in an OSGi environment:
Require-Capability: osgi.extender;filter:="(osgi.extender=osgi.servicelo
ader.registrar)",osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Provide-Capability:
osgi.serviceloader;osgi.serviceloader="org.apache.commons.logging.LogFactory"
to follow the spec: [133 Service Loader Mediator Specification - OSGi
Enterprise
7](https://docs.osgi.org/specification/osgi.enterprise/7.0.0/service.loader.html)
---
| | [ ![Add Comment](cid:jira-generated-image-static-comment-
icon-08d74753-83d0-4f55-a590-15a2f9591037)
](https://issues.apache.org/jira/browse/LOG4J2-3545#add-comment "Add Comment")
| [Add Comment](https://issues.apache.org/jira/browse/LOG4J2-3545#add-comment
"Add Comment")
---|---
| This message was sent by Atlassian Jira (v8.20.10#820010-sha1:ace47f9) | |
![Atlassian logo](https://issues.apache.org/jira/images/mail/atlassian-email-
logo.png)
---