mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2025-11-13 18:00:12 +00:00
update kotlin and add versions plugin
This commit is contained in:
16
src/androidMain/kotlin/ActualLogger.kt
Normal file
16
src/androidMain/kotlin/ActualLogger.kt
Normal file
@@ -0,0 +1,16 @@
|
||||
package dev.inmo.kslog.common
|
||||
|
||||
import android.util.Log
|
||||
|
||||
|
||||
internal actual val defaultLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit = { l, t, m, e ->
|
||||
val messageString = m.toString()
|
||||
when(l) {
|
||||
LogLevel.DEBUG -> Log.d(t, messageString, e)
|
||||
LogLevel.VERBOSE -> Log.v(t, messageString, e)
|
||||
LogLevel.INFO -> Log.i(t, messageString, e)
|
||||
LogLevel.WARNING -> Log.w(t, messageString, e)
|
||||
LogLevel.ERROR -> Log.e(t, messageString, e)
|
||||
LogLevel.ASSERT -> Log.wtf(t, messageString, e)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user