-
Notifications
You must be signed in to change notification settings - Fork 32
SLF4J usage #16
Comments
Created PR: #22 |
At a general level, replacing the pre-configured ( PR #22 changes behavior in a couple ways; one somewhat benign, one somewhat not. PR #22 results in some additional output when Tomcat first starts: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Perhaps white noise, but to the unsuspecting, it could be perplexing since the message would not have been previously seen until an update to A bit more worrisome is that by default, PR #22 results in slf4j using the NOP binding in the absence of a user-provided one, so by default no logging will be output from So how to address those two items ... One could add a binding to the Do you know if the If not, perhaps we can address this with documentation. While a viable alternative, for the 2 reasons listed above, I'd like to first to pursue further how we can maintain current behavior while adding SLF4J support. Thoughts? |
Interesting, you are right about your understanding of the SLF4J docs. As a collateral effect it is possible to have multiple bindings into the classpath in case the use don't configure the exclusion and also add another binder into the classpath. That is kind of a common problem with the slf4j usage with the unaware programmer. However that's something that already happens very often... So, I think that we have two options
Thank you |
I'm encouraged by your option 1 suggestion. Can you create a PR? Please include a doc update that describes how to configure the dependency exclusion. |
Sure, I'll work on that today and update the PR. |
Hi @ccheetham , both #22 and #23 were updated as we discussed. |
Many libraries and projects today use SLF4J in order to provide a more flexible logging usage.
It gives the developer the freedom to chose whatever log framework he or she wants.
Jedis just aproved this same sort of migration:
Https://github.com/xetorthio/jedis/issues/1340
I think that this lib could follow the same example in order to follow this industry pattern and be more friendly with developers.
I would also make a request with this feature that seems simple. May I?
The text was updated successfully, but these errors were encountered: