Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable logging in Eclipse Platform and Eclipse SDK products #1094

Closed
jonahgraham opened this issue Jun 1, 2023 · 0 comments · Fixed by #1195
Closed

Enable logging in Eclipse Platform and Eclipse SDK products #1094

jonahgraham opened this issue Jun 1, 2023 · 0 comments · Fixed by #1195

Comments

@jonahgraham
Copy link
Contributor

In 4.28 a lot of work was done to enable slf4j in #588 and related issues, leading to this entry in the the N&N:

Migrate to SLF4J-2 from Maven-Central

Besides breaking changes in the other sfl4j packages than org.sfl4j, version 2 has also changed the way to connect the slf4j.api bundle to a logging-backend to use Java's ServiceLoader mechanism. Consequently you have to make sure that the logging-backend used in your application uses is compatible with slf4j.api version 2. Additionally a OSGi Service Loader Mediator is needed to permit Java's ServiceLoader access to the the provider bundle. To fulfill this requirement Eclipse Platform ships org.apache.aries.spifly.dynamic.bundle by default. If you assemble a final application you have to ensure that this bundle is automatically activated during startup. For an Eclipse Product this can be achieved by assigning the Plug-in org.apache.aries.spifly.dynamic.bundle a suitable start-level in the Configuration section of your product.

This issue to to apply those changes to the Eclipse Platform and Eclipse SDK products.

This issue came out of discussions in EPP eclipse-packaging/packages#27 and EPP will adapt the packages in the same way as platform.

I am not sure if it should be covered under the same issue, or a separate issue, but making the default logger in Eclipse log to the Eclipse .log rather than no-op logging may be best?

HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this issue Jul 3, 2023
This allows the slf4j-api bundle to find the nop binding and thus
prevents error messages about missing bindings.

Fixes eclipse-platform#1094
HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this issue Jul 23, 2023
This allows the slf4j-api bundle to find the nop binding and thus
prevents error messages about missing bindings.

Fixes eclipse-platform#1094
HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this issue Jul 27, 2023
Add the slf4j-simple bundle instead of slf4j-nop, but disable all
logging by default. This allows users to configure logging at their
discretion in the eclipse.ini:
https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html

Additionally auto-start Aries SPI-Fly bundle and slf4j-simple in SDK to
allow the slf4j-api bundle to find the simple provider and thus
prevents error messages about missing bindings.

Fixes eclipse-platform#1094
Fixes eclipse-platform#1226
HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this issue Aug 9, 2023
Add the slf4j-simple bundle instead of slf4j-nop, but disable all
logging by default. This allows users to configure logging at their
discretion in the eclipse.ini:
https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html

Additionally auto-start Aries SPI-Fly bundle and slf4j-simple in SDK to
allow the slf4j-api bundle to find the simple provider and thus
prevents error messages about missing bindings.

Fixes eclipse-platform#1094
Fixes eclipse-platform#1226
HannesWell added a commit that referenced this issue Aug 11, 2023
Add the slf4j-simple bundle instead of slf4j-nop, but disable all
logging by default. This allows users to configure logging at their
discretion in the eclipse.ini:
https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html

Additionally auto-start Aries SPI-Fly bundle and slf4j-simple in SDK to
allow the slf4j-api bundle to find the simple provider and thus
prevents error messages about missing bindings.

Fixes #1094
Fixes #1226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant