eclipse-serializer / serializer

Serializer project
Eclipse Public License 2.0
57 stars 6 forks source link

Consider to use java.util.logging instead of slf4j #75

Open zdenek-jonas opened 10 months ago

zdenek-jonas commented 10 months ago

We might want to consider using java.util.logging instead of slf4j.

java.util.logging is part of the JDK, so using it means having one less external dependency.

zambrovski commented 7 months ago

You are right about dependencies, but in almost all backend enterprise projects over last ten years (J2EE, JEE, Spring) the key of successful logging was to use a proper logging abstraction (as slf4j API is). It was a pain to configure all the java.util, commons-loggin, jboss-logging, log4j1 and jog4j2 friendly frameworks and bridge them all to slf4j and then configure a proper logging backend (like logstash or something or logback) to produce adequate log with central configuration usable in a distributed environment, well maintained in elk stack...

So please if you definitely want to fall back to JUL for logging, at least introduce an own facade so someone can easily replace it by proper enterprise logging.

There are long discussions on that on StackOverflow, and I really believe t is not just "some small design decision" but rather has a huge impact on configuration and flexibility of the framework:

zdenek-jonas commented 7 months ago

The purpose of this issue is to discuss it. There is no decision now. The last version has been updated to SFL4J 2.

michael-schnell commented 5 months ago

As SLF4J is just an API (only one small JAR), there shouldn't be a real problem with external dependencies. If your favourite logger is "java.util.logging", you can easily use it with SLF4J by adding "slf4j-jdk14" to your classpath. As Simon pointed out, for other users the possibility to have a different SLF4J implementation is quite important.