-
-
Notifications
You must be signed in to change notification settings - Fork 110
Use SLF4J instead of Log4J directly #32
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
Comments
Yes, makes sense. Use of log4j is due package predating slf4j. But do note that log4j is "provided" dependency, and not used by default. |
In my opinion, given what SLF4J is, the best, I think, would just to depend on The whole point of SLF4J is to not depend directly on logger implementation and let the user choose |
Even though the dependency is in provided scope, IIRC, it still has to be in the classpath for compiling projects that depend on it. I either have to add I think fully moving to SLF4J is the way to go (but then release the change as a major, potentially breaking change, I believe). Looking into some other usages of this project here on GitHub, I see many people are doing |
I deleted my other GitHub account. Contact this account if you need. |
Looks like there is a java modules problem with the log4j dependency. The module-info.java file has 'requires log4j;' "java.lang.module.FindException: Module log4j not found, required by com.fasterxml.uuid" |
@hanson76 I'll test with jigsaw tomorrow. It makes sense to not require that anymore, also. |
@hanson76 Could you test it with the latest version from my fork? See #33 |
Sorry for late answer but been busy. |
@hanson76 does that include log messages from this library? |
Yes |
@cowtowncoder Is there a plan to merge the fix in #33 and release a new version anytime soon? |
There one more good reason for the migration to SLF4J. |
It seems there is a legitimate reason to migrate then, @cowtowncoder |
That CVE may be a practical concern: from quick look it does not seem like actual security issue in itself or via JUG, but security tools whine incessantly about such dependency so as to make it a practical problem nonetheless (no, I am not big fan of current handling of CVEs as a maintainer). Having said that... My only concern so far has been that of trying to avoid adding strong dependency (i.e. being able to leave dependency as So perhaps the simplest and best course is to just move to using |
Implemented, released as new major version, 4.0, available via Maven Central. |
Having this depend specifically on Log4J can produce a weird situation when used in projects that use other logging frameworks (which is the problem SLF4J, or depending only on API jars, tackle).
As far as I could see, there isn't a lot of complex things going on here that would require direct access to some Log4J-specific features, so I would like to know if you'd be willing to migrate this to SLF4J (or Log4J2-API).
I can port it myself, but I wanted to know your positioning on the matter before forking and creating a PR
The text was updated successfully, but these errors were encountered: