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

[Feature] 'Strict' startup mode that fails if no or multiple bindings are configured #418

Open
stevenschlansker opened this issue Jun 12, 2024 · 0 comments

Comments

@stevenschlansker
Copy link

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?

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

1 participant