mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2024-12-22 22:17:15 +00:00
setDefaultKSLog and KSLog#plus(KSLog)
This commit is contained in:
parent
35e3d02837
commit
0e01534562
@ -2,6 +2,9 @@
|
||||
|
||||
## 0.4.2
|
||||
|
||||
* Add `setDefaultKSLog`
|
||||
* Add `plus` operation for two `KSLog` instances to call them both on each log performing
|
||||
|
||||
## 0.4.1
|
||||
|
||||
* Fixes in resolution ambiguity for functions with messages
|
||||
|
@ -110,3 +110,5 @@ fun KSLog(
|
||||
).filtered { l, _, _ ->
|
||||
minLoggingLevel.ordinal <= l.ordinal
|
||||
}
|
||||
|
||||
fun setDefaultKSLog(newDefault: KSLog) { KSLog.default = newDefault }
|
||||
|
9
src/commonMain/kotlin/utils/Combination.kt
Normal file
9
src/commonMain/kotlin/utils/Combination.kt
Normal file
@ -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)
|
||||
}
|
Loading…
Reference in New Issue
Block a user