Logging in Tests
In case your library only depends on slf4j-api
but no actual log implementation, you get the following warning when you run tests:
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
and you won’t see any logs. This is unfortunate sometimes.
To have a logger implementation available for tests, use
testImplementation 'org.slf4j:slf4j-simple:1.7.30'