Skip to content

Commit

Permalink
(DOCSP-27408): Replace Kotlin Logger w/ Kermit Logger (#2490)
Browse files Browse the repository at this point in the history
## Pull Request Info

### Jira

- https://jira.mongodb.org/browse/DOCSP-27408

### Staged Changes

N/A

### Reminder Checklist

If your PR modifies the docs, you might need to also update some
corresponding
pages. Check if completed or N/A.

- [N/A] Create Jira ticket for corresponding docs-app-services
update(s), if any
- [N/A] Checked/updated Admin API
- [N/A] Checked/updated CLI reference

### Review Guidelines


[REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md)

Co-authored-by: Mohammad Hunan Chughtai <mohammad.hunan@mongodb.com>
  • Loading branch information
Mohammad Hunan Chughtai and Mohammad Hunan Chughtai committed Jan 13, 2023
1 parent 4ded19b commit e13a86b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions examples/kotlin/shared/build.gradle.kts
Expand Up @@ -19,6 +19,7 @@ kotlin {
implementation(libs.kotlinx.coroutines)
implementation("io.github.aakira:napier:2.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.3")
api("co.touchlab:kermit:0.1.8")
}
}
val commonTest by getting {
Expand Down
@@ -1,28 +1,22 @@
package com.mongodb.realm.realmkmmapp
import co.touchlab.kermit.Kermit

import io.github.aakira.napier.Napier

/*
* Log -- singleton class for interacting with Napier without
* constantly naming Napier
*/
object Log {
fun wtf(log: String) {
Napier.wtf(log)
}
val kermit = Kermit()

fun e(log: String) {
Napier.e(log)
kermit.e { log }
}
fun w(log: String) {
Napier.w(log)
kermit.w { log }
}
fun d(log: String) {
Napier.d(log)
kermit.d { log }
}
fun i(log: String) {
Napier.i(log)
kermit.i { log }
}
fun v(log: String) {
Napier.v(log)
kermit.v { log }
}
}

0 comments on commit e13a86b

Please sign in to comment.