Hi, we maintain a medium sized Maven project that uses slf4j in all modules. From time to time, we find that committers have inadvertently broken the log setup in some random module - slf4j-simple was pulled in via some transitive test dependency that was removed, or you add a new dependency and now logback comes in too. If you don't watch your test output closely, the SLF4J Warning messages are not found until a Logging Architect comes by and realizes the problem.
Suggested resolution: add a slf4j.strict=true flag that turns related warnings (no providers, multiple providers) into an error (thrown exception to fail initialization) rather than a warning. We can then set this on our build and eagerly fail if any problems are introduced.
I'd be happy to write up a PR if this feature would be accepted. What do you think?
Hi, we maintain a medium sized Maven project that uses slf4j in all modules. From time to time, we find that committers have inadvertently broken the log setup in some random module -
slf4j-simple
was pulled in via some transitive test dependency that was removed, or you add a new dependency and nowlogback
comes in too. If you don't watch your test output closely, the SLF4J Warning messages are not found until a Logging Architect comes by and realizes the problem.Suggested resolution: add a
slf4j.strict=true
flag that turns related warnings (no providers, multiple providers) into an error (thrown exception to fail initialization) rather than a warning. We can then set this on our build and eagerly fail if any problems are introduced.I'd be happy to write up a PR if this feature would be accepted. What do you think?