logback-android icon indicating copy to clipboard operation
logback-android copied to clipboard

Document usage compatible with the standard JUnit tests

Open edgarsi opened this issue 3 years ago • 0 comments

README.md provides a useful gradle configuration for running an app, but isn't unit test friendly. You've already provided a detailed workaround using Robolectric but Robolectric is quite a chunky solution just to be able to use logger in unit-testable classes.

At the cost of complicating the build file, it is still worth letting people use logger in unit-test covered classes, right from the guide you provide. Please consider changing the given example:

dependencies {
  compile 'org.slf4j:slf4j-api:1.7.25'
  compile 'com.github.tony19:logback-android:2.0.0'
  testImplementation 'ch.qos.logback:logback-classic:1.2.11'
}
configurations.testImplementation {
    exclude module: 'logback-android'
}

edgarsi avatar Sep 13 '22 07:09 edgarsi