mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2024-09-20 17:36:13 +00:00
14 lines
392 B
Kotlin
14 lines
392 B
Kotlin
package dev.inmo.kslog.common
|
|
|
|
import kotlin.jvm.JvmInline
|
|
|
|
/**
|
|
* Logger which will use [tag] as default one in cases when [performLog] have `null` tag
|
|
*/
|
|
@JvmInline
|
|
value class TagLogger(val tag: String) : KSLog {
|
|
override fun performLog(level: LogLevel, tag: String?, message: Any, throwable: Throwable?) {
|
|
KSLog.performLog(level, tag ?: this.tag, message, throwable)
|
|
}
|
|
}
|