mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2024-12-22 22:17:15 +00:00
KSLog with iterable
This commit is contained in:
parent
2b79b6d060
commit
63b29d3665
@ -3,6 +3,7 @@
|
|||||||
## 0.0.2
|
## 0.0.2
|
||||||
|
|
||||||
* New logger `TagLogger` and now extension `Any#logger` will use it to decrease objects allocations
|
* New logger `TagLogger` and now extension `Any#logger` will use it to decrease objects allocations
|
||||||
|
* Now it is possible to create `KSLog` using any iterable
|
||||||
|
|
||||||
## 0.0.1
|
## 0.0.1
|
||||||
|
|
||||||
|
@ -44,9 +44,12 @@ expect fun KSLog(
|
|||||||
|
|
||||||
fun KSLog(
|
fun KSLog(
|
||||||
defaultTag: String,
|
defaultTag: String,
|
||||||
levels: Set<LogLevel>
|
levels: Iterable<LogLevel>
|
||||||
): KSLog = KSLog (defaultTag) { l, _, _, _ ->
|
): KSLog {
|
||||||
l in levels
|
val levels = levels.toSet()
|
||||||
|
return KSLog (defaultTag) { l, _, _, _ ->
|
||||||
|
l in levels
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun KSLog(
|
fun KSLog(
|
||||||
|
Loading…
Reference in New Issue
Block a user