Add slf4j logging for kotlin jvm and android

This commit is contained in:
Steve Myers
2021-06-20 23:39:42 -07:00
parent f1c1524e61
commit adb54e3b87
5 changed files with 30 additions and 15 deletions

View File

@@ -1,6 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
//apply plugin: 'kotlin-android-extensions'
apply plugin: 'maven-publish'
android {
@@ -24,15 +23,7 @@ android {
}
}
//task buildRust(type: Exec) {
// workingDir '../'
// commandLine './build.sh'
//}
afterEvaluate {
// android.libraryVariants.all { variant ->
// variant.javaCompileProvider.get().dependsOn(buildRust)
// }
publishing {
publications {
@@ -68,7 +59,9 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.core:core-ktx:1.5.0'
api "org.slf4j:slf4j-api:1.7.30"
androidTestImplementation 'com.github.tony19:logback-android:2.0.0'
androidTestImplementation (project(':test-fixtures')) {
exclude group: 'net.java.dev.jna', module: 'jna'
}

View File

@@ -0,0 +1,14 @@
<configuration>
<appender name="logcat" class="ch.qos.logback.classic.android.LogcatAppender">
<tagEncoder>
<pattern>%logger{12}</pattern>
</tagEncoder>
<encoder>
<pattern>[%-20thread] %msg</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="logcat" />
</root>
</configuration>