-
Notifications
You must be signed in to change notification settings - Fork 119
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
feat: use SLF4J for logging #1680
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a "feature"?
e8fe585
to
3e58807
Compare
core/pom.xml
Outdated
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-jdk14</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a test only dependency?
It looks like this is meant for deployment time configuration otherwise: https://www.slf4j.org/manual.html#swapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the scope to runtime
. I think we should have logs to debug issues outside of the test scope. Please let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I've got this wrong, but I'd expect we code to the slf4j-api and then allow applications to supply the "provider". Since we do want logs in test, we should make sure we have a provider in a test scope. Otherwise, we don't want to impose an implementation on our customers.
See https://www.slf4j.org/manual.html#libraries for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we remove slf4j-jdk14
dependency, and then add a <scope>test</scope>
dependency for logback-classic-1.4.6.jar. I prefer Logback to Java 1.4 logging because I find it is much easier to configure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a <scope>test</scope>
dependency for logback-classic
as suggested.
Note: the last logback-classic
version that supports Java 8 is 1.3.11
959e3a2
to
b7909b5
Compare
b7909b5
to
8edd164
Compare
Fixes #1594