mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
feat: Write logs to file
This commit is contained in:
parent
5d6d25c261
commit
b1766ebb94
5 changed files with 64 additions and 4 deletions
|
@ -1,6 +1,14 @@
|
|||
package eu.kanade.tachiyomi.util.system
|
||||
|
||||
import co.touchlab.kermit.LogWriter
|
||||
import co.touchlab.kermit.Logger
|
||||
import co.touchlab.kermit.platformLogWriter
|
||||
|
||||
fun Logger.w(e: Throwable) = w(e) { "Something is not right..." }
|
||||
fun Logger.e(e: Throwable) = e(e) { "Something went wrong!" }
|
||||
fun Logger.setToDefault(
|
||||
writersToAdd: List<LogWriter>,
|
||||
) {
|
||||
Logger.setLogWriters(listOf(platformLogWriter()) + writersToAdd)
|
||||
Logger.setTag("Yokai")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue