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

Logging disregards slf4j nop settings #77

Closed
bobbotron opened this Issue Dec 21, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@bobbotron

bobbotron commented Dec 21, 2017

This project actively ignores slf4j no operation implementation. This is breaks the spirit of how slf4j logging projects are supposed to work.

This is interfering with automated testing in a project I work on, where this output is distracting in our build output.

if (!(lf instanceof NOPLoggerFactory)) {

@cruftex

This comment has been minimized.

Member

cruftex commented Dec 22, 2017

Thanks for the issue. That's a relevant point. The presence of the NOPLoggerFactory can mean two things:

  1. The logging is switched off
  2. There are multiple log frameworks included and logging via SLF4J is switched off by including the dependency slf4j-nop.

The code passage is there for the reason 2. In your scenario the logging auto detection probably falls back to JDK logging.

Possible solutions with the current version:

  • Bridge JDK/JUL logging to SLF4J
  • Switch off cache2k logging in the JDK logger (org.cache2k=OFF)

I'll check with the other projects, whether we can remove this check.

@cruftex cruftex self-assigned this Dec 22, 2017

@cruftex cruftex added the bug label Dec 22, 2017

@cruftex cruftex added this to the v1.0.2 milestone Dec 22, 2017

@cruftex cruftex closed this in b87b6b8 Dec 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment