i'm taking class files in android library , moving non-android specific classes (data structures, etc.) in plain java library. of these classes using android.util.log logging. i'd retain logging, not dependent on android logger in plain java library. ideally, logging substitute still go android logger when running in android program.
what best course of action take here? can substitute in java.util.logging?
i advise use slf4j in library , combine logback implementation android.
[group: 'org.slf4j', name: 'slf4j-api', version: '1.7+'] [group: 'com.github.tony19', name: 'logback-android-core', version: '1+'], [group: 'com.github.tony19', name: 'logback-android-classic', version: '1+'] slf4j library provides logging interface without implementation. logging implementation library (like logback or log4j) can compiled app provide actual logging configuration , output.
Comments
Post a Comment