-
Notifications
You must be signed in to change notification settings - Fork 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
Multiple slf4j bindings #48
Comments
In your project, did you include the OpenTimestamp dep as suggested in |
Yep. I should have mentioned in my original message that I'm using Gradle rather than Maven. I did try adding the exclusion for the group in the dependency like this:
Unfortunately that didn't work. I did some further exploration and found that the JAR up on Maven Central currently includes the slf4j-simple and it's associated class files. I have made a temporary workaround by building my own version of the library and replacing slf4j-simple with slf4j-api which I was able to get things working with, but this means that I need to pay close attention to the other dependencies that the java-opentimestamps library requires. |
Yeah, sorry, we should separate the cli (with slf4j-simple) from the API (with slf4j-api) as previously discussed |
Are you open to pull requests for making updates to this kind of thing? |
yes, but at the moment it is not a priority for me, you should expect long review times |
This corrects a logger collision issue when using java-opentimestamps as a code dependency with other projects. The original issue can be found at opentimestamps#34 and opentimestamps#48.
e8b5e58 is the only thing required? |
Apologies I missed your notification amongst all my other ones. I think there is still a small bit more to do around testing the CLI support with the logging. I'm using that fork for now to get things building for our specific use case where we use the JAR directly as a library. There are two avenues that I'm investigating: First is there a way that the project could be built that allows the production of a lib only JAR for use with other applications whilst still allowing the production of an executable JAR that includes the Second it appears slf4j is not used throughout the library, instead java.util.logging is used. The outcome of this is the configuration in our application environment which means that we do get some extra logging in our application when we are doing OpenTimestamp operations. Would you be open to replacing the usage of java.util.logging with slf4j? I would be interested in any thoughts or questions that you have around these. |
This corrects a logger collision issue when using java-opentimestamps as a code dependency with other projects. The original issue can be found at opentimestamps#34 and opentimestamps#48.
First case would be a nice improvement, but also the core library could need something log, maybe you are considering to use only java.util.logging in core library, right? At the moment, slf4j looks never used, so it could be remove from pom.xml. |
I'm looking to use this library in an existing web project which is also using log4j. I saw that there was some previous discussion about this on #34.
After adding 1.18 to my project there is an error with multiple slf4j bindings existing both in the logback library we are already using and in the opentimestamp jar which is causing a resolution issue at runtime. I saw that there was an associated PR to fix this situation by excluding the slf4j simple jar but from what I can tell the bundled jar from mavenCentral still includes the dependency.
Is there a way that this could be worked around by splitting the project into two jars. One providing the CLI functionality and the other providing the api functionality?
The text was updated successfully, but these errors were encountered: