Skip to content
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

Provide mechanism to squelch provider warnings at startup #431

Open
robertpatrick opened this issue Sep 17, 2024 · 2 comments
Open

Provide mechanism to squelch provider warnings at startup #431

robertpatrick opened this issue Sep 17, 2024 · 2 comments
Assignees
Labels
DONE for fixed issues NOT_A_BUG

Comments

@robertpatrick
Copy link

We have software that uses a couple of different technologies. One is an application that includes the nop jar that our application builds on top of. We have no ability to change the underlying application. We also use sshj as an SSH client that uses SLF4J to log. In order to capture the logs generated by sshj, we include a provider in the classpath. Now, at startup. we see the following warnings in stdout:

SLF4J(W): Class path contains multiple SLF4J providers.
SLF4J(W): Found provider [org.slf4j.jul.JULServiceProvider@704ca8a8]
SLF4J(W): Found provider [org.slf4j.nop.NOPServiceProvider@61c98f5]
SLF4J(W): See https://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J(I): Actual provider is of type [org.slf4j.jul.JULServiceProvider@704ca8a8]

I need a way to suppress this output.

@ceki
Copy link
Member

ceki commented Sep 20, 2024

@robertpatrick Regarding the supression of internal messages see faq entry.

Regarding the choice of the provider, since version 2.0.9, you can specify the provider class explicitly via the "slf4j.provider" system property. This bypasses the service loader mechanism for finding providers and may shorten SLF4J initialization. For a list of providers class names, see the relevant FAQ entry.

@ceki ceki self-assigned this Sep 20, 2024
@ceki ceki added NOT_A_BUG DONE for fixed issues labels Sep 20, 2024
@ceki
Copy link
Member

ceki commented Sep 20, 2024

I am marking this issue as done. Let me know if you have further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DONE for fixed issues NOT_A_BUG
Projects
None yet
Development

No branches or pull requests

2 participants