mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2026-11-02 01:32:54 +00:00
setDefaultKSLog and KSLog#plus(KSLog)
This commit is contained in:
1 parent
35e3d02837
commit
0e01534562
3 files changed
+14
No files matched your search
@@ -110,3 +110,5 @@ fun KSLog(
|
||||
).filtered { l, _, _ ->
|
||||
minLoggingLevel.ordinal <= l.ordinal
|
||||
}
|
||||
|
||||
fun setDefaultKSLog(newDefault: KSLog) { KSLog.default = newDefault }
|
||||
@@ -0,0 +1,9 @@
|
||||
package dev.inmo.kslog.common.utils
|
||||
|
||||
import dev.inmo.kslog.common.CallbackKSLog
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
|
||||
infix operator fun KSLog.plus(other: KSLog) = CallbackKSLog { l, t, m, e ->
|
||||
this@plus.performLog(l, t, m, e)
|
||||
other.performLog(l, t, m, e)
|
||||
}
|
||||
Reference in new issue
Block a user