[slf4j-user] "Fail loudly" for NOP implementation
Steven Schlansker
sschlansker at opentable.com
Wed Sep 9 00:54:31 CEST 2015
Hello slf4j-user,
I have noticed a pattern in Java applications I develop - generally, we like to use
logback for our deployments, and slf4j-simple during tests.
It is very easy to accidentally misconfigure your Maven POM and end up getting the
classic "No StaticLoggerBinder found, defaulting to NOP" message, and then not get
any output at all.
Would people enjoy having the option to subscribe to the "fail early and fail loud"
school of thought, and have a way to configure the LoggerFactory to fail fatally
rather than default to NOP? I am imagining something very simple, essentially
changing LoggerFactory#bind to inspect a system property or environment variable,
and if it is set cause binding to fail rather than NOP.
Any thoughts?
Best,
Steven
More information about the slf4j-user
mailing list