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

Support SLF4J 2.0.x for slf4j-bridge #567

Closed
Marc-Ducret opened this issue Nov 18, 2022 · 1 comment · Fixed by #577
Closed

Support SLF4J 2.0.x for slf4j-bridge #567

Marc-Ducret opened this issue Nov 18, 2022 · 1 comment · Fixed by #577
Assignees

Comments

@Marc-Ducret
Copy link

If any other library depends on slf4j-api 2.0.x, the StaticLoggerBinder approach will not work as it is no longer supported in such versions of SLF4J. See https://www.slf4j.org/codes.html#ignoredBindings.

In this case such warnings would be printed:

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:/home/user/.cache/coursier/v1/https/repo1.maven.org/maven2/dev/zio/zio-logging-slf4j-bridge_2.13/2.1.3/zio-logging-slf4j-bridge_2.13-2.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.

And therefore logs sent to SLF4J are then simply ignored.

@justcoon
Copy link
Contributor

Hi @Marc-Ducret ,

thank you for report

I briefly check that, and it is look like that specific implementation for slf4j 2.0.x will be needed

@justcoon justcoon self-assigned this Nov 24, 2022
@justcoon justcoon mentioned this issue Nov 27, 2022
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

Successfully merging a pull request may close this issue.

2 participants