rewrite way of filters work

This commit is contained in:
2022-07-30 14:56:26 +06:00
parent be48c2559e
commit 4d98b7df18
8 changed files with 142 additions and 24 deletions

View File

@@ -1,7 +1,9 @@
package dev.inmo.kslog.common
typealias SimpleKSLogCallback = (level: LogLevel, tag: String?, message: Any, throwable: Throwable?) -> Unit
class CallbackKSLog(
private val performLogCallback: (level: LogLevel, tag: String?, message: Any, throwable: Throwable?) -> Unit
private val performLogCallback: SimpleKSLogCallback
) : KSLog {
override fun performLog(level: LogLevel, tag: String?, message: Any, throwable: Throwable?) = performLogCallback(level, tag, message, throwable)
}