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

Switch to Java 9+ System.Logging instead of SLF4J #627

Open
hrstoyanov opened this issue Aug 13, 2023 · 2 comments
Open

Switch to Java 9+ System.Logging instead of SLF4J #627

hrstoyanov opened this issue Aug 13, 2023 · 2 comments

Comments

@hrstoyanov
Copy link

Is your feature request related to a problem? Please describe.

Currently Microstream introduces a hard dependency to SLF4J logging facade. However, since Java 9, there is built-in facade that does the same (e.g. can forwards to Log4, logback, Java Native [ java.uil.logging, JUL] ) . In addition, it allows for performant lazy logging (with lambdas), which I do not think is possible with SLF4J, and it also plays nicely with the upcoming Java 21+ String templates (JEP 430)

Describe the solution you'd like

Remove SL4J and switch to the new , built-in Java 9+ System Logging.

Additional context

If you agree that this is a useful change that willbe accepted, I can volunteer and create a merge request

@hrstoyanov hrstoyanov changed the title Switch to Java 9+ System.Logging instead of SlF4J Switch to Java 9+ System.Logging instead of SLF4J Aug 13, 2023
@hg-ms
Copy link
Contributor

hg-ms commented Aug 17, 2023

Many thanks for your offer to create a pull request that replaces the SLF4J dependency with java build in logging facade. Unfortunately, we must decline it although it would be nice to remove that dependency to SLF4J. The System.Logger class is not available on android. If we replace SLF4J with System.Logger we can’t run on android systems any more.

@hrstoyanov
Copy link
Author

hrstoyanov commented Aug 22, 2023

Ok, I see the reason. However, sacrificing modern Java features for compatibility with Android might not be the best strategy going forward - the gap between Java and Android will only grow bigger, given that Google is fully focused on flutter/dart and not interested in java.

Perhaps it is better to split Android out into a separate (Eclipse) project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants