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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress a warning around SLF4J #569

Open
yuk1ty opened this issue Mar 17, 2024 · 3 comments
Open

Suppress a warning around SLF4J #569

yuk1ty opened this issue Mar 17, 2024 · 3 comments

Comments

@yuk1ty
Copy link
Contributor

yuk1ty commented Mar 17, 2024

(I'm not sure where I should write this kind of discussion so I filed an issue. This issue is just a proposal for the maintainer; not a bug stuff 馃憤馃徎)

We can see the following log when we launch the server (and there are lots of mentions in issues of this repo):

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.

I propose that it should be ok if we suppress this warning by adding slf4j-nop into dependencies. The kotlin-language-server seems to be mainly taking advantage of java.util.logging.Logger as far as I know. I tried to add it on my local machine and the removal was working fine. The page in the message says the following thing as well:

If you are responsible for packaging an application and do not care about logging, then placing slf4j-nop.jar on the class path of your application will get rid of this warning message

What do you think about that? If that seems to be ok, I would like to work on this!

@fwcd
Copy link
Owner

fwcd commented Mar 17, 2024

I agree that it would be best to get rid of the warning, but ideally we should forward those messages to JUL too, so they get picked up by own our logging pipeline.

@SkrrtBacharach
Copy link

I'm really not familiar with how Java/Kotlin do logging, but is there a reason why slf4j-api.jar is included in the deps at all?

@fwcd
Copy link
Owner

fwcd commented Mar 29, 2024

Libraries often use SLF4J as their logging API

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

No branches or pull requests

3 participants