it's relovution, Johny

This commit is contained in:
2022-06-08 18:23:11 +06:00
parent 3f600f3691
commit 95779af7b6
7 changed files with 107 additions and 45 deletions

View File

@@ -37,10 +37,14 @@ class CallbackKSLog(
}
expect fun KSLog(
fun KSLog(
defaultTag: String,
filter: (l: LogLevel, t: String, m: String, Throwable?) -> Boolean
) : KSLog
) : KSLog = KSLog { l, t, m, e ->
if (filter(l, t ?: defaultTag, m, e)) {
KSLog.default.performLog(l, t ?: defaultTag, m, e)
}
}
fun KSLog(
defaultTag: String,
@@ -52,7 +56,7 @@ fun KSLog(
}
}
inline fun KSLog(
fun KSLog(
defaultTag: String,
firstLevel: LogLevel,
secondLevel: LogLevel,